package com.qaup.collision.rule.model.enums;

/**
 * 电子围栏告警级别枚举
 */
public enum RuleAlertLevel {
    
    /**
     * 信息级别
     */
    INFO("信息", 1),
    
    /**
     * 警告级别
     */
    WARNING("警告", 2),
    
    /**
     * 严重级别
     */
    CRITICAL("严重", 3),
    
    /**
     * 紧急级别
     */
    EMERGENCY("紧急", 4);
    
    private final String description;
    private final int level;
    
    RuleAlertLevel(String description, int level) {
        this.description = description;
        this.level = level;
    }
    
    public String getDescription() {
        return description;
    }
    
    public int getLevel() {
        return level;
    }
    
    /**
     * 判断当前级别是否高于或等于指定级别
     */
    public boolean isHigherOrEqual(RuleAlertLevel other) {
        return this.level >= other.level;
    }
} 