package com.cool.store.enums.point;

import java.util.Objects;

/**
 * @author zhangchenbiao
 * @FileName: StoreFlowTrendEnum
 * @Description:门店人流动向
 * @date 2024-03-26 16:08
 */
public enum StoreFlowTrendEnum {

    //1.主要流动路线 2.次要流动路线
    STORE_FLOW_TREND_1(1, "主要流动路线", 7),
    STORE_FLOW_TREND_2(2, "次要流动路线", 4),
    ;

    private Integer code;

    private String desc;

    private Integer score;

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

}
