package com.sikey.wa04.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: qin
 * @Date: 2025/3/19
 * @Description: 消息类型
 */
@AllArgsConstructor
@Getter
public enum MessageTypeEnum {

    // 语聊消息
    MESSAGE_TYPE_UP_CHAT_ING(30),

    // 语聊消息
    MESSAGE_TYPE_DOWN_CHAT_ING(31),

    // 通知消息
    MESSAGE_TYPE_NOTIFICATION(40),

    // 定位消息
    MESSAGE_TYPE_LOCATION(50),

    // 视频通话来电
    Message_Type_Video_Call(60);


    private final Integer value;


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