package org.springblade.common.enums;

import lombok.Getter;

/**
 * 优惠券类型枚举
 */
@Getter
public enum BusinessSceneEnum {
	NEW("新人福利", 1),
	FULL_SUBTRACTION("福利中心", 2),
	THRESHOLD_FREE("其他", 3);
	private String name;
	private Integer value;

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

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