package com.openhis.web.externalintegration.enums;

/**
 * 【BPC】实名认证标志
 *
 * @author Thanking
 * @date 2025-10-16
 */
public enum BpcRealNameAuthFlag {

    /**
     * 或不存在：无需实名认证
     */
    NO_NEED("0", "无需实名认证"),
    /**
     * 实名支付，支付通道需验证支付账户所有人和以下payerName/payerID/payerIDType信息一致
     */
    NEED("1", "实名支付");

    private final String value;
    private final String description;

    BpcRealNameAuthFlag(String value, String description) {
        this.value = value;
        this.description = description;
    }

    public String getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    public static BpcRealNameAuthFlag getByValue(String value) {
        if (value == null || "".equals(value.trim())) {
            return null;
        }
        for (BpcRealNameAuthFlag val : values()) {
            if (val.getValue().equals(value)) {
                return val;
            }
        }
        return null;
    }
}
