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

/**
 * 活体类型枚举
 */
public enum LivenessTypeEnum {
    /**
     * 唇语验证码
     */
    LIP("LIP", "唇语验证码"),
    /**
     * 动作序列
     */
    ACTION("ACTION", "动作序列");

    private String code;
    private String name;

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

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

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }
}
