package org.springblade.common.enums;

import lombok.Getter;

/**
 * 物流状态枚举类
 */
@Getter
public enum LogisticsStateEnum {
	UNDELIVERED("待发货", 1),
	SHIPPED("已发货", 2),
	received("已收货",3);
	private String name;
	private Integer value;

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

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