package com.sckw.core.model.enums;

import lombok.Getter;

/**
 * @author czh
 * @desc 告警明细
 * @date 2023/6/15
 */
@Getter
public enum AlarmTitleEnum {

    //离线时长超1天
    ALARM_TITLE_ONE(1, "1", "离线时长超24小时"),
    //数值超阈值
    ALARM_TITLE_TWO(2, "2", "数值超阈值");

    private final int code;

    private final String status;

    private final String name;

    AlarmTitleEnum(int code, String status, String name) {
        this.code = code;
        this.status = status;
        this.name = name;
    }

    public static AlarmTitleEnum getName(int code) {
        for (AlarmTitleEnum entryTypeEnum : values()) {
            if (entryTypeEnum.getCode() == code) {
                return entryTypeEnum;
            }
        }
        return null;
    }
}