package com.sdtool.common.datas;

/**
 * @Author: xl Created on 2024-05-21
 * @Content: ERP版本
 */
public enum ERPVersion {

    SMALL("小型ERP", 0, "Small"),

    MIDDLE("中型ERP", 1, "Small"),

    BIG("大型ERP", 2, "");

    private String name;
    private int value;
    private String code;

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

    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 String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

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

}
