package com.gk.hotwork.Domain.Enum;
|
|
import com.baomidou.mybatisplus.core.enums.IEnum;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
|
import java.io.Serializable;
|
|
public enum DocumentType implements IEnum {
|
|
|
RESCUE("RESCUE", "应急救援预案"),
|
FLOW("FLOW", "流向信息管理承诺书"),
|
;
|
|
private String code;
|
private String msg;
|
|
DocumentType(String code, String msg) {
|
this.code = code;
|
this.msg = msg;
|
}
|
|
public String getCode() {
|
return code;
|
}
|
@JsonValue
|
public String getMsg() {
|
return msg;
|
}
|
|
|
|
public static DocumentType parse(String code){
|
for(DocumentType dt:DocumentType.values()){
|
if(dt.getCode().equals(code)){
|
return dt;
|
}
|
}
|
return null;
|
}
|
|
@Override
|
public Serializable getValue() {
|
return this.code;
|
}
|
}
|