package com.cool.store.enums.point;

import java.util.Objects;

/**
 * @author zhangchenbiao
 * @FileName: WantShopSizeEnum
 * @Description:意向门店开间尺寸
 * @date 2024-03-26 16:08
 */
public enum WantShopSizeEnum {

    //1.转角 2.12米以上 3.8-12米 4.4-8米 5.4米以下
    WANT_SHOP_SIZE_1(1, "转角", 6),
    WANT_SHOP_SIZE_2(2, "12米以上", 2),
    WANT_SHOP_SIZE_3(3, "8-12米", 3),
    WANT_SHOP_SIZE_4(4, "4-8米", 5),
    WANT_SHOP_SIZE_5(5, "4米以下", 3)
    ;

    private Integer code;

    private String desc;

    private Integer score;

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

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public Integer getScore() {
        return score;
    }

    public static WantShopSizeEnum getByCode(Integer code) {
        if(Objects.isNull(code)){
            return null;
        }
        for (WantShopSizeEnum value : WantShopSizeEnum.values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

}
