package com.wms_main.constant.enums.wms;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 物料状态的枚举
 */
@Getter
@AllArgsConstructor
public enum WmsLocationTypeEnums {
    TYPE_500(0, "500尺寸"),
    TYPE_600(1, "600尺寸"),
    TYPE_EMPTY(2, "空木托"),
    TYPE_PRODUCT(3, "成品");
    private final Integer code;
    private final String desc;

    public static WmsLocationTypeEnums getEnum(Integer code) {
        for (WmsLocationTypeEnums e : WmsLocationTypeEnums.values()) {
            if (e.getCode().equals(code)) {
                return e;
            }
        }
        return null;
    }
}