package org.springblade.common.enums;

import lombok.Getter;

/**
 * 订单类型枚举类
 */
@Getter
public enum OrderTypeEnum {
	NORMAL("普通订单", 1),
	TICKET("酒票订单", 2),
	CONSIGN("寄售订单", 3),
	FACE("人脸识别订单", 4),
	RECHARGE("充值订单", 5),
	RE_ORDER("红包商城订单", 6),
	RE_EXCHANGE("红包商城积分兑换订单", 7),
	MAKE("创客订单", 8),
	PARTNER("城市合伙人订单", 9),
	LINKED("共富1580订单", 10);
	private String name;
	private Integer value;

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

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