package com.zt.plat.module.qms.resource.material.enums;

import lombok.Getter;

/**
 * 物料出库业务类型
 */
@Getter
public enum MaterialOutboundType {
    receive_outbound("领用出库"),

    return_outbound("退货出库"),

    replace_outbound("换货出库"),

    check_outbound("盘点出库");

    private final String name;

    MaterialOutboundType(String name) {
        this.name = name;
    }

    public static MaterialFlowType fromName(String name) {
        for (MaterialFlowType type : MaterialFlowType.values()) {
            if (type.getName().equals(name)) {
                return type;
            }
        }
        throw new IllegalArgumentException("No enum constant with name: " + name);
    }
}
