package com.iwunu.nbiot.common.util;


/**
 * @author kinfeng
 * @date 2021-04-18 15:01
 * @desc
 */
public enum ReportSeverEnum {
	//cardNoLock,passwordLock,fingerLock,offlinePwdLock,faceLock,adminPwdLock,keyLock
	//数据类型 1.卡开锁 2.密码开锁 3.远程开锁 4.蓝牙开锁 5.指纹开锁 6.管理密码开锁 7.人脸开锁 8.机械钥匙开锁 9.离线密码开锁
	CARDNOLOCK(1,"cardNoLock"),
    PASSWORDLOCK(2,"passwordLock"),
    FINGERLOCK(5,"fingerLock"),
    ADMINPWDLOCK(6,"adminPwdLock"),
    FACELOCK(7,"faceLock"),
    KEYLOCK(8,"keyLock"),
    OFFLINEPWDLOCK(9,"offlinePwdLock"),
    ;
    private Integer code ;
    private String desc ;

    ReportSeverEnum(Integer code, String desc){
        this.code=code;
        this.desc=desc;
    }
    public static Integer getType(String type) {  
        for (ReportSeverEnum c : ReportSeverEnum.values()) {  
            if (c.desc .equals(type)) {  
                return c.code;  
            }  
        }  
        return null;  
    }
    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
    public static void main(String[] args) {
		System.out.println(getType("passwordLock"));
	}
}
