package com.sikey.wa04.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: qin
 * @Date: 2025/3/18
 * @Description: 通知类型
 */
@AllArgsConstructor
@Getter
public enum NotificationTypeEnum {

    // 设备绑定状态变更通知
    NOTIFICATION_TYPE_DEVICE_STATUS_CHANGE(100),

    // 询问设备位置
    NOTIFICATION_TYPE_ASK_LOCATION(111),

    // 联系人变动通知
    NOTIFICATION_TYPE_CHANGED_CONTACTS(130),

    // 通知添加好友结果通知
    NOTIFICATION_TYPE_CREATED_FRIEND(120),

    // 闹钟变更通知
    NOTIFICATION_TYPE_CHANGED_ALARM_CLOCK(140),

    // 上课禁用变更通知
    NOTIFICATION_TYPE_CHANGED_SCHOOL_MODE(141),

    // 设备关机通知
    NOTIFICATION_TYPE_DEVICE_SHUT_DOWN(150),

    // 设备重启通知
    NOTIFICATION_TYPE_DEVICE_REBOOT(160),

    // 拒接陌生人开关变更通知
    NOTIFICATION_TYPE_BLOCK_UNKNOWN_CALLS(170),

    // 消息中心变动通知
    NOTIFICATION_TYPE_MESSAGE_CENTER(180);

    private final Integer value;


    public static NotificationTypeEnum valueOf(Integer value) {
        for (NotificationTypeEnum notificationTypeEnum : values()) {
            if (notificationTypeEnum.value.equals(value)) {
                return notificationTypeEnum;
            }
        }
        throw new RuntimeException("Unknown notification type: " + value);
    }
}
