package tech.glinfo.enbao.common.utils;

public enum OpenEnventEnum implements IEnventEnum{

    FACE("01", "人脸开锁成功"),
    PWD("02", "密码开锁成功"),
    CARD("03", "卡片开锁成功"),
    PALM("04", "掌静脉开锁成功"),
    FINGER("05", "指纹开锁成功"),
    YC("06", "手机远程开锁成功");

    OpenEnventEnum(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public static String getName(String code) {
        for (OpenEnventEnum c : OpenEnventEnum.values()) {
            if (c.getCode().equals(code)) {
                return c.description;
            }
        }
        return null;
    }

    private String code;
    private String description;

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getDescription() {
        return description;
    }
}
