xiangpei
2025-05-14 47cd9ecc0eff38ffe6b3b794b2bf197e958f4403
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.mindskip.xzs.domain.enums;
 
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;
 
/**
 * 考试作废
 *
 * @author gonghl
 */
@Getter
public enum AnswerInvalidEnum {
 
    VALID("0", "有效"),
    INVALID("1", "无效"),
    DEPRIVATION("2", "取消补考资格"),
    ;
 
    @EnumValue // 标明该字段存入数据库
    private final String code;
 
    @JsonValue // 标明在转JSON时使用该字段,即响应时
    private final String desc;
 
    AnswerInvalidEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }
 
}