package com.cool.store.enums.point;

import java.util.Objects;

/**
 * @author zhangchenbiao
 * @FileName: IntendPositionEnum
 * @Description:绿化带
 * @date 2024-03-26 16:08
 */
public enum GreenBeltEnum {

    //1.门口无绿化带阻挡 2.门口有绿化带阻挡
    GREEN_BELT_1(1, "门口无绿化带阻挡", 3),
    GREEN_BELT_2(2, "门口有绿化带阻挡", 1),
    ;

    private Integer code;

    private String desc;

    private Integer score;

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


}
