You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
658 B

package com.bx.common.enums;
public enum MessageStatus {
UNREAD(0,"未读"),
ALREADY_READ(1,"已读"),
RECALL(2,"已撤回");
private Integer code;
private String desc;
MessageStatus(Integer index, String desc) {
this.code =index;
this.desc=desc;
}
public static MessageStatus fromCode(Integer code){
for (MessageStatus typeEnum:values()) {
if (typeEnum.code.equals(code)) {
return typeEnum;
}
}
return null;
}
public String getDesc() {
return desc;
}
public Integer getCode(){
return this.code;
}
}