package com.yuchen.saas.park.api.enums.security;

/**
 * @description:
 * @author: 洪铭铭
 * @time: 2024/9/26 11:04
 */
public enum ElectronicFenceDefenseAreaStatusEnum {

    NOT_USED(0, "防区未使用"),
    DISABLED(1, "防区撤防"),
    DEPLOY(2, "防区布防"),
    SIDE_DEFENSE(3, "防区旁路"),
    ALARM(4, "防区报警"),
    LOW_VOLTAGE(5, "无线防区欠压"),
    OFF_LINE(6, "防区掉线与主线总线脱离"),
    NOT_READY(7, "未准备就绪");

    private final int value;
    private final String description;

    ElectronicFenceDefenseAreaStatusEnum(int value, String description) {
        this.value = value;
        this.description = description;
    }

    public int getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    public static ElectronicFenceDefenseAreaStatusEnum fromValue(int value) {
        for (ElectronicFenceDefenseAreaStatusEnum type : ElectronicFenceDefenseAreaStatusEnum.values()) {
            if (type.value == value) {
                return type;
            }
        }
        throw new IllegalArgumentException("Unknown enum value: " + value);
    }




}
