package com.qnfhq.modules.c2c.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.SchemaProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;
import java.util.Date;


/**
 * 聊天消息表
 *
 * @author yelz 30262728@qq.com
 * @since 1.0.0 2025-11-25
 */
@Data
@Schema(name = "聊天消息表")
public class C2cMsgContentDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @SchemaProperty(name = "消息编号")
    private Long mid;

	@SchemaProperty(name = "发送人编号")
//    @NotNull(message="{NotBlank.senderId}")//发送人不能空
	private Long senderId;

	@SchemaProperty(name = "接收人编号")
    @NotNull(message="{NotBlank.recipientId}")//接收人不能空
	private Long recipientId;

	@SchemaProperty(name = "消息内容")
    @Length(min=1, max = 1000,message="{Length.content}")//消息内容长度不能超过1000
    @NotBlank(message="{NotBlank.content}")//消息内容不能空
	private String content;

	@SchemaProperty(name = "消息类型: text 文本 image 图片 voice 语音 video 视频 location位置 ")
    @NotBlank(message="{NotBlank.msgType}")//消息类型不能空
	private String msgType;

    @SchemaProperty(name = "0已发送 1已送达 2已读 3已撤回")
    private Integer status;

    @SchemaProperty(name = "发送时间")
    private Date sendTime;
}
