package com.cool.store.enums.point;

import java.util.Objects;

/**
 * @author zhangchenbiao
 * @FileName: StoreOutlookEnum
 * @Description:门店观赡
 * @date 2024-03-26 16:08
 */
public enum GuestConvenienceEnum {

    // 1.门口5米有人行横道 2.门口15米有人行横道 3.无人行横道
    GUEST_CONVENIENCE_1(1, "门口5米有人行横道", 3),
    GUEST_CONVENIENCE_2(2, "门口15米有人行横道", 2),
    GUEST_CONVENIENCE_3(3, "无人行横道", 1),
    ;

    private Integer code;

    private String desc;

    private Integer score;

    GuestConvenienceEnum(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 GuestConvenienceEnum getByCode(Integer code) {
        if(Objects.isNull(code)){
            return null;
        }
        for (GuestConvenienceEnum value : GuestConvenienceEnum.values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }


}
