liusheng
2025-04-27 5673a45b1bbbe33f2837ba8d94ce601c5f3e41b5
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package com.ruoyi.common.enums;
 
/**
 * 发送类型枚举
 */
public enum PhotoEnum {
    jpg("jpg ", "jpg "), jpeg("jpeg", "jpeg"), png("png", "png"), gif("gif", "gif"), bmp("bmp", "bmp"), tiff("tiff ", "tiff "), tif("tif", "tif"), svg("svg", "svg");
 
 
    private String code;
    private String desc;
 
    PhotoEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }
 
    public static Boolean getDescByCode(String code) {
        PhotoEnum[] organEnums = values();
        for (int i = 0; i < organEnums.length; i++) {
            PhotoEnum organEnum = organEnums[i];
            if (organEnum.getCode().equals(code)) {
                return true;
            }
        }
        return false;
    }
 
 
    public String getCode() {
        return code;
    }
 
    public void setCode(String code) {
        this.code = code;
    }
 
    public String getDesc() {
        return desc;
    }
 
    public void setDesc(String desc) {
        this.desc = desc;
    }
}