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.

37 lines
658 B

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