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.gk.hotwork.Domain.Enum;
|
| import com.baomidou.mybatisplus.core.enums.IEnum;
| import com.fasterxml.jackson.annotation.JsonValue;
|
| import java.io.Serializable;
|
| public enum EnterpriseSize implements IEnum {
| MICRO("MICRO","微型"),
| SMALL("SMALL","小型"),
| MEDIUM("MEDIUM","中型"),
| LARGE("LARGE","大型");
|
|
| EnterpriseSize(String code, String msg) {
| this.code = code;
| this.msg = msg;
| }
|
| private String code;
| @JsonValue
| private String msg;
|
| public String getCode() {
| return code;
| }
|
| public String getMsg() {
| return msg;
| }
|
| public static EnterpriseSize parse(String code){
| for(EnterpriseSize es:EnterpriseSize.values()){
| if(es.getCode().equals(code)){
| return es;
| }
| }
| return null;
| }
|
| @Override
| public Serializable getValue() {
| return this.code;
| }
| }
|
|