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
| package com.oying.modules.pc.store.domain.enums;
|
| import lombok.Getter;
|
| @Getter
| public enum StoreStatusEnum {
|
| DRAFT(1000, "创建中"),
| PENDING(1001, "待审核"),
| UNDER_REVIEW(1002, "审核中"),
| REJECTED(1003, "拒绝"),
| APPROVED(1004, "同意"),
| COMING_SOON(2100, "即将开业"),
| OPEN(2101, "营业中"),
| CLOSED(2102, "停止营业");
|
| private final Integer value;
| private final String reasonPhrase;
|
| StoreStatusEnum(Integer value, String reasonPhrase) {
| this.value = value;
| this.reasonPhrase = reasonPhrase;
| }
|
| public static StoreStatusEnum get(Integer code) {
| for (StoreStatusEnum value : values()) {
| if (value.value.equals(code)) {
| return value;
| }
| }
| return null;
| }
| }
|
|