package org.springblade.common.enums;

import lombok.Getter;

/**
 * 专区类型枚举类
 */
@Getter
public enum ZoneTypeEnum {
	GREEN_INTEGRAL("绿色积分专区", 1),
	INTEGRAL_CONVERT("积分兑换专区", 2),
	RED_INTEGRAL("红色积分专区", 3),
	GUEST("创客专区", 4),
	CITY_PARTNER("城市合伙人专区", 5),
	HOT_STYLE("爆品秒杀专区", 6),
	DOUBLE_ELEVEN("双十一会场", 7),
	LINKED("联动", 8);
	private String name;
	private Integer value;

	ZoneTypeEnum(String name, Integer value) {
		this.name = name;
		this.value = value;
	}

	public static String getNameByValue(Integer value) {
		for (ZoneTypeEnum zoneTypeEnum : ZoneTypeEnum.values()) {
			if (zoneTypeEnum.value.equals(value)) {
				return zoneTypeEnum.getName();
			}
		}
		return "未知";
	}
}
