ChatRecord.java
1010 Bytes
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
package cn.fw.hermes.domain.db;
import cn.fw.common.data.entity.BaseEntity;
import lombok.Data;
import java.util.Date;
/**
* 聊天记录
*
* @Author: liwei
* @Date: 2018/12/10 16:05
*/
@Data
public class ChatRecord extends BaseEntity<ChatRecord, Long> {
/**
* 消息发送者
*/
private String fromAccount;
/**
* 消息接收者
*/
private String toAccount;
/**
* 发送时间
*/
private Date sendTime;
/**
* 消息内容
*/
private String content;
public static ChatRecord create(String fromAccount,
String toAccount,
Date sendTime,
String content) {
ChatRecord chatRecord = new ChatRecord();
chatRecord.setFromAccount(fromAccount);
chatRecord.setToAccount(toAccount);
chatRecord.setSendTime(sendTime);
chatRecord.setContent(content);
return chatRecord;
}
}