package org.springblade.common.enums;

import lombok.Getter;

/**
 * 奖品类型枚举
 */
@Getter
public enum PrizeTypeEnum {
	INTEGRAL("积分", 1),
	REAL_GOODS("实物", 2),
//	COUPON("优惠券", 3),
	THINKS("谢谢参与", 4);
	private String name;
	private Integer value;

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

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