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

import lombok.Getter;

/**
 * 物料实例来源
 */
@Getter
public enum MaterialInfomationOrigin {
    batch_inbound("批次入库"),

    standard_solution_make("标液配置"),

    hazardous_material_make("危化品配置"),

    verify_calibrate("检定校准"),
    ;

    private final String name;

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

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