package org.springblade.common.enums;

import lombok.Getter;

/**
 * 跳转类型枚举类
 */
@Getter
public enum SkipTypeEnum {
	NONE("无", 1),
	ARTICLE("文章", 2),
	GROUPON("团购", 3);
	private String name;
	private Integer value;

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

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