package com.cusc.nirvana.user.rnr.fp.constants;

/**
 *本地系统将实名结果回传业务结果
 */
public enum ResultCodeEnum {
    /**
     * 通过
     */
    PASS("3", "通过"),
    /**
     * 未通过
     */
    NOT_PASS("4", "未通过"),
    /**
     * 作废
     */
    INVALID("9", "作废"),
    ;

    private String code;
    private String name;

    ResultCodeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static ResultCodeEnum getEnumByCode(String code) {
        for (ResultCodeEnum sys : ResultCodeEnum.values()) {
            if (sys.getCode().equals(code)) {
                return sys;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }
}
