package com.cool.store.enums.master;

/**
 * @Author suzhuhong
 * @Date 2025/8/6 16:49
 * @Version 1.0
 */
public enum BrandTypeEnum {

    JP(1, "正新鸡排"),
    SMZ(2, "正新三明治"),
    ZSJ(3, "正烧记"),
    MX(4, "大鼓米线"),
    CXM(5, "串小妹"),
    MZG(6, "茂掌柜");

    ;
    private Integer code;

    private String desc;

    BrandTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static Integer getCodeByDesc(String desc) {
        for (BrandTypeEnum value : values()) {
            if (value.getDesc().equals(desc)) {
                return value.getCode();
            }
        }
        return null;
    }

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