package org.springblade.common.enums;

import lombok.Getter;

/**
 * 支付标识枚举类
 */
@Getter
public enum OrderSourceEnum {
	MINI_PROGRAM("小程序", 1),
	APP("APP", 2);
	private String name;
	private Integer value;

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

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