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

/**
 * @description:
 * @author: 洪铭铭
 * @time: 2024/9/11 10:40
 */
public enum ElectronicFenceActionTypeEnum {

        OUT_DEFENSE(0, "外出布防或者布防"),
        CANCEL(1, "撤防"),
        DEFENSE_IMMEDIATELY(2, "立即布防"),
        HOME_DEFENSE(3, "在家布防留守布"),
        INSTANT_DEFENSE(4, "即时留守布防"),
        RESET(5, "清除报警记忆复位");

        private final int value;
        private final String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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


}
