package com.ywt.mg.domain.models.enums;

/**
 * 地区等级枚举
 */
public enum AreaLevelEnum {
    country("国家", 1),
    province("省、直辖市", 2),
    city("市、直辖区", 3),
    region("地级区、县", 4),
    UNKNOW("",0);

    private final String displayName;

    private final int value;

    AreaLevelEnum(String displayName, int value){
        this.displayName = displayName;
        this.value = value;
    }

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static AreaLevelEnum valueOf (int value){
        switch (value) {
            case 1 :
                return country;
            case 2:
                return province;
            case 3:
                return city;
            case 4:
                return region;
            default:
                return UNKNOW;
        }
    }

}
