package com.gyee.generation.model.vo;

public enum AlarmSuperTalbeType {

    WT("alarmWt", "设备报警超级表"),
    BT("alarmBt", "升压站报警超级表"),
    CT("alarmCt", "自定义报警超级表");

    private String code;
    private String name;

    AlarmSuperTalbeType(String code) {
        this.code = code;
    }

    AlarmSuperTalbeType(String code, String name) {
        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;
    }

    /**
     * 根据code获取message
     *
     * @param code
     * @return
     */
    public static String getNmaeByCode(String code) {
        for (AlarmSuperTalbeType ele : values()) {
            if (ele.getCode().equals(code)) {
                return ele.getName();
            }
        }
        return null;
    }


}
