package com.cool.store.enums;

/**
 * @Author: WangShuo
 * @Date: 2025/07/24/15:54
 * @Version 1.0
 * @注释:
 */
public enum ShopDecorationAttributesEnum {
    //0-新开店 1-老店新开 2-老店翻新 3-迁址
    NEW_OPEN(0,"新开店"),
    OLD_NEW_OPEN(1,"老店新开"),
    RENEWAL(2,"老店翻新"),
    RELOCATION(3,"迁址");
    private Integer code;
    private String desc;
    ShopDecorationAttributesEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
    public static String getDescByCode(Integer code) {
        for (ShopDecorationAttributesEnum value : ShopDecorationAttributesEnum.values()) {
            if (value.getCode().equals(code)) {
                return value.getDesc();
            }
        }
        return null;
    }
    public static ShopDecorationAttributesEnum getShopDecorationAttributesEnumByCode(Integer code) {
        for (ShopDecorationAttributesEnum value : ShopDecorationAttributesEnum.values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
