package cn.cecep.talroad.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * Bas_device表 type枚举
 */


public enum BasDeviceSiteTypeEnum {
    PROD("生产", "1", "生产"),
    GOVERNANCE("治理", "2", "治理"),

    ;

    private String code;
    private String industry;
    private String name;
    private static final Map<String, String> codeValueMap = new HashMap<>();

    static {
        for (BasDeviceSiteTypeEnum item : BasDeviceSiteTypeEnum.values()) {
            codeValueMap.put(item.getCode(), item.getName());
        }
    }

    BasDeviceSiteTypeEnum(String industry, String code, String name) {
        this.industry = industry;
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

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

    public String getName() {
        return name;
    }

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

    public String getIndustry() {
        return industry;
    }

    public void setIndustry(String industry) {
        this.industry = industry;
    }

    public String getNameByCode(String code) {
        return codeValueMap.get(code);
    }
}

