package com.weather.modules.sys.enums;

/**
 * 通知级别
 */
public enum AlertLevelEnum {
    INFO("info", "提示"),
    WARNING("warning", "警告"),
    DANGER("danger", "紧急");

    private final String value;
    private final String label;

    AlertLevelEnum(String value, String label) {
        this.value = value;
        this.label = label;
    }

    public String getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }

    public static boolean isValid(String value) {
        for (AlertLevelEnum e : values()) {
            if (e.value.equals(value)) return true;
        }
        return false;
    }
}
