洪城义警-正式版后台
zengh
2021-06-22 b762ec2dd9db7ebcf222b0621cd3c1671f9f451c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package org.springblade.modules.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")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long senderId;
 
    /**
     * 接收消息人id
     * @NotNull(message = "接收消息人id不能为空")
     */
    @TableField("recipient_id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long recipientId;
 
}