package org.springblade.common.enums;

import lombok.Getter;

/**
 * 售后状态枚举类
 */
@Getter
public enum AfterSalesStatusEnum {
	WAIT("申请中", 0),
	FINISH("完成", 1),
	CLOSE("关闭", 2),
	PROCESSED("处理中", 3),
	REFUSE("已驳回", 4);
	private String name;
	private Integer value;

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

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