package cn.koala.v;
/**
* @author koala
* @Description: global 变量定义
* @date 2021/7/69:48
*/
public enum GlobalStatus {
RED(0,"红"),BLUE(1,"蓝"),BLACK(2."黑");
private Integer code;
private String des;
GlobalStatus(Integer code, String des) {
this.code = code;
this.des = des;
}
public static GlobalStatus getEnum(Integer code){
for(GlobalStatus globalStatus : GlobalStatus.values()){
if(globalStatus.equals(code)){
return GlobalStatus.getEnum(code);
}
}
return null;
}
public Integer getCode() {
return code;
}
public String getDes() {
return des;
}
}