baizonghao
2023-07-31 98b2f41e13c48219e054cf8b80c459298a01c910
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
package com.mindskip.xzs.domain.enums;
 
import java.util.HashMap;
import java.util.Map;
 
/**
 * @version 2.2.0
 * @description: 试卷类型
 * Copyright (C), 2020-2021, 武汉思维跳跃科技有限公司
 * @date 2021 /9/7 9:45
 */
public enum ExamPaperTypeEnum {
 
    /**
     * Fixed exam paper type enum.
     */
    Fixed(1, "固定试卷"),
    /**
     * Classes exam paper type enum.
     */
    Classes(3, "班级试卷"),
    /**
     * Time limit exam paper type enum.
     */
    TimeLimit(4, "时段试卷"),
    /**
     * Task exam paper type enum.
     */
    Task(6, "任务试卷"),
    /**
     * Random exam paper type enum.
     */
    Random(7, "随机试卷");
 
    /**
     * The Code.
     */
    int code;
    /**
     * The Name.
     */
    String name;
 
    ExamPaperTypeEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }
 
 
    private static final Map<Integer, ExamPaperTypeEnum> keyMap = new HashMap<>();
 
    static {
        for (ExamPaperTypeEnum item : ExamPaperTypeEnum.values()) {
            keyMap.put(item.getCode(), item);
        }
    }
 
    /**
     * From code exam paper type enum.
     *
     * @param code the code
     * @return the exam paper type enum
     */
    public static ExamPaperTypeEnum fromCode(Integer code) {
        return keyMap.get(code);
    }
 
 
    /**
     * Gets code.
     *
     * @return the code
     */
    public int getCode() {
        return code;
    }
 
    /**
     * Sets code.
     *
     * @param code the code
     */
    public void setCode(int code) {
        this.code = code;
    }
 
    /**
     * Gets name.
     *
     * @return the name
     */
    public String getName() {
        return name;
    }
 
    /**
     * Sets name.
     *
     * @param name the name
     */
    public void setName(String name) {
        this.name = name;
    }
 
 
}