package cn.sikey.websocket.message;

import cn.sikey.websocket.enums.MessageType;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.time.Instant;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author: nelson
 * @Date: 2025/5/29
 * @Description: 消息
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ToString
public class Message {

    /**
     * 消息ID
     */
    private MessageId id;

    /**
     * 消息类型
     */
    private MessageType type;

    /**
     * 消息类容
     */
    private Object content;

    /**
     * 消息发送人
     */
    private String senderId;

    /**
     * 发送时间
     */
    private LocalDateTime sendTime;

    /**
     * 消息读取记录
     */
    private List<MessageReceivedLog> receivedLogs;

    /**
     * 消息读取人列表
     */
    private List<String> receiverId;

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

}
