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; } }