package com.yuchen.saas.park.api.enums.property;

import lombok.Getter;

/**
 * 楼栋类型
 */
@Getter
public enum HeightTypeEnum {
    BOTTOM(1, "底层"),
    MIDDLE(2, "中层"),
    MIDDLE_HIGH(3, "中高层"),
    HIGH(4, "高层"),
    ;

    private Integer value;
    private String desc;
    HeightTypeEnum(int i, String desc) {
        value = i;
        this.desc=desc;
    }

    public boolean compare(int i){return value == i;}
    public static HeightTypeEnum convert(int intValue) {
        HeightTypeEnum[] allValues = HeightTypeEnum.values();
        for(int i = 0; i < allValues.length; i++) {
            if(allValues[i].compare(intValue))
                return allValues[i];
        }
        return null;
    }
}
