package com.sdtool.common.datas;

/**
 * sys_databasemultiitem的分厂类型
 */
@SuppressWarnings("unused")
public enum DataBaseFactoryType {
    print("印刷厂", 0),
    outAssist("外协厂", 1);
    private String name;
    private int value;

    DataBaseFactoryType(String name, int value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public static String getName(int value) {
        for (DataBaseFactoryType p : DataBaseFactoryType.values()) {
            if (p.getValue() == value) return p.getName();
        }
        return null;
    }
}
