package com.njcn.process.enums;

import lombok.Getter;

@Getter
public enum ApplyFormEnum {
    ONLINE_MONITORING_EXCEEDS (1, "电能质量-在线监测超标问题申请单"),
    MONITORING_ABNORMAL (2, "电能质量-运维监控异常申请单"),
    USER_COMPLAINT(3, "电能质量-用户投诉申请单"),
    GENERAL_TEST_EXCEEDED (4, "电能质量-普测超标问题申请单"),
    MONITORINGRETURNED (5, "监测设备退运申请单"),

    ;
    private final Integer code;

    private final String message;

    ApplyFormEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static ApplyFormEnum getAlarmTypeEnumByCode(Integer code) {
        for (ApplyFormEnum alarmTypeEnum : ApplyFormEnum.values()) {
            if (alarmTypeEnum.getCode().equals(code)) {
                return alarmTypeEnum;
            }
        }
        return null;
    }
}
