package enumeration.general; import com.baomidou.mybatisplus.annotation.EnumValue; import com.fasterxml.jackson.annotation.JsonValue; import lombok.Getter; /** * 通知类型 * * @author:gonghl * @date:2024/4/15 15:15 */ @Getter public enum NotifyTypeEnum { WORK_ORDER("WORK_ORDER", "工单"), CHECK("CHECK", "考核"), ; @EnumValue // 标明该字段存入数据库 @JsonValue // 标明在转JSON时使用该字段,即响应时 private final String value; private final String desc; NotifyTypeEnum(String value, String desc) { this.value = value; this.desc = desc; } }