package cn.sikey.websocket.controller.app.message.vo;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @Author: nelson
 * @Date: 2025/5/30
 * @Description: 消息发布
 */
@Data
@Accessors(chain = true)
public class MessagingPublishReqVO<T> implements Serializable {
    @Serial
    private static final long serialVersionUID = -9151951858562015064L;

    /**
     * 消息类型
     */
    @NotNull(message = "消息类型不能为空")
    private Integer msgType;

    /**
     * 消息发送的时间
     */
    @NotNull(message = "发送时间不能为空")
    private LocalDateTime sendTime;

    /**
     * 接收者ID
     */
    @NotBlank(message = "接收者ID不能为空")
    private String recvId;

    /**
     * 消息内容
     */
    @NotNull(message = "消息内容不能为空")
    private T content;

    @Data
    @Accessors(chain = true)
    public static class TestContent implements Serializable {
        @Serial
        private static final long serialVersionUID = -9151951858562015064L;

    }

}
