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

import lombok.Getter;

@Getter
public enum MaterialFlowType {

    acceptance("验收"),

    return_material("退货"),

    replace_material("换货"),

    make_apply("配置申请"),

    verify_calibrate("量具检定"),

    inventory_check("库存盘点"),
    ;

    private final String name;

    MaterialFlowType(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);
    }
}
