package org.springblade.common.enums;

import lombok.Getter;

/**
 * 售后类型枚举类
 */
@Getter
public enum AfterSalesTypeEnum {
	REFUND("全部退款", 1),
	RETURN_GOODS("退货", 2),
	PART_REFUND("部分退款", 3),
	NOT_ARRIVE_REFUND("未到货退款", 4);
	private String name;
	private Integer value;

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

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