package com.cool.store.enums.HqtEnum;

import com.cool.store.enums.StoreTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <p>
 * 红圈通门店类型枚举类
 * </p>
 *
 * @author wangff
 * @since 2026/1/19
 */
@Getter
@AllArgsConstructor
public enum HqtStoreTypeEnum {
    OPTION710("option710", "无展示门店", StoreTypeEnum.NO_SHOW_STORE),
    OPTION711("option711", "餐厅店", StoreTypeEnum.RESTAURANT_STORE),
    OPTION712("option712", "普通门店", StoreTypeEnum.ORDINARY_STORE),
    ;

    /**
     * 红圈通编码
     */
    private final String code;

    /**
     * 描述
     */
    private final String msg;

    /**
     * 门店类型
     */
    private final StoreTypeEnum type;

    public static HqtStoreTypeEnum getByStoreType(Integer type) {
        for (HqtStoreTypeEnum value : HqtStoreTypeEnum.values()) {
            if (value.type.getCode().equals(type)) {
                return value;
            }
        }
        return null;
    }
}
