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

/**
 * 活体动作序列枚举
 * 1代表张嘴，2代表闭眼。
 */
public enum LivenessActionSeqEnum {
    /**
     * 张嘴
     */
    OPEN_MOUSE("1", "张嘴"),
    /**
     * 闭眼
     */
    CLOSE_EYE("2", "闭眼");

    private String code;
    private String name;

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

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

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }
}
