package org.springblade.jfpt.chatrecords.entity;
|
|
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
import lombok.Data;
|
import org.springframework.format.annotation.DateTimeFormat;
|
import javax.validation.constraints.NotNull;
|
import java.io.Serializable;
|
import java.util.Date;
|
|
/**
|
*
|
* @author zhongrj
|
* @time 2021-06-18
|
* @desc 聊天记录实体类
|
*
|
*/
|
|
@Data
|
@TableName("sys_chat_records")
|
public class ChatRecords implements Serializable {
|
/**
|
* 主键id
|
*/
|
@TableId(value = "id",type = IdType.AUTO)
|
private Long id;
|
|
/**
|
* 发送消息内容
|
*/
|
@TableField("post_message")
|
private String postMessage;
|
|
/**
|
* 消息类型 0 文本 1 表情 2 图片 3 视频...
|
*/
|
@TableField("message_type")
|
private Integer messageType;
|
|
/**
|
* 接收状态 0 已接收 1 未接收
|
*/
|
private Integer status;
|
|
/**
|
* 发送时间
|
*/
|
@TableField("post_time")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
private Date postTime;
|
|
/**
|
* 发送消息人id
|
*
|
*/
|
@NotNull(message = "发送消息人id不能为空")
|
@TableField("sender_id")
|
private Long senderId;
|
|
/**
|
* 接收消息人id
|
* @NotNull(message = "接收消息人id不能为空")
|
*/
|
@TableField("recipient_id")
|
private Long recipientId;
|
|
}
|