zepengdev
2025-06-14 6e0a83c55db4bae4d23a4c281946bda1d610f678
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
package com.oying.modules.pc.store.domain.enums;
 
import lombok.Getter;
 
@Getter
public enum StoreCategoryEnum {
 
    NOT(0, "已禁用"),
    YES(1, "已启用");
 
    private final Integer value;
    private final String reasonPhrase;
 
    StoreCategoryEnum(int value, String reasonPhrase) {
        this.value = value;
        this.reasonPhrase = reasonPhrase;
    }
 
    public static StoreCategoryEnum get(Integer code) {
        for (StoreCategoryEnum value : values()) {
            if (value.value.equals(code)) {
                return value;
            }
        }
        return null;
    }
 
}