luohairen
2024-11-28 50fd1ca826d556657c09e4702a0f2de0d218b2c8
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
package com.ycl.common.enums.business;
 
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;
 
/**
 * 文件类型枚举
 *
 * @author:flq
 * @date:2024/11/27 18:21
 */
@Getter
public enum FileTypeEnum {
    PROJECT_INFO("project_info", "项目基本信息");
 
    @EnumValue // 标明该字段存入数据库
    private final String type;
 
    @JsonValue // 标明在转JSON时使用该字段
    private final String desc;
 
    FileTypeEnum(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }
}