package org.springblade.common.enums;

import lombok.Getter;

/**
 * 订单类型枚举类
 */
@Getter
public enum PaymentTypeEnum {
	ALIPAY("支付宝付款", 0),
	LINKAGE_PAY("联动快捷支付", 1),
	BALANCE_PAY("余额支付", 2),
	WEIXIN_PAY("微信支付",3);
	private String name;
	private Integer value;

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

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