package org.springblade.common.enums;

import lombok.Getter;

/**
 * 优惠券状态枚举
 */
@Getter
public enum WithdrawalStateEnum {
	APPLYING("审核中", 1),
	SUCCESS("成功", 2),
	FAIL("失败", 3);
	private String name;
	private Integer value;

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

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