-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathCommentDO.java
93 lines (78 loc) · 1.89 KB
/
CommentDO.java
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
package com.jmal.clouddisk.model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.validation.annotation.Validated;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;
/**
* @Description 评论
* @Author jmal
* @Date 2020-04-02 10:25
*/
@Data
@Validated
public class CommentDO {
@Id
String id;
/***
* 文件Id
*/
String fileId;
/***
* 评论者邮箱 必填
*/
@Email(message = "邮箱格式不正确")
String senderEmail;
/***
* 评论者
*/
@NotNull(message = "名称不能为空")
String sender;
/***
* 评论内容
*/
@NotNull(message = "内容不能为空")
String content;
/***
* 评论时间
*/
@JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
LocalDateTime date;
/***
* 评论更新时间 当该评论有新回复时会更新该时间
*/
@JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
LocalDateTime updateDate;
/***
* 评论楼层
*/
@NotNull(message = "评论楼层不能为空")
Integer floor;
/***
* 评论父层
*/
Integer parentFloor;
/***
* 评论者Id 如果未登录则为空
*/
String senderId;
/***
* 接收者
*/
@NotNull(message = "接收者不能为空")
String receiver;
/***
* 接收者Id 如果该接收者评论时未登录则为空
*/
String receiverId;
/***
* 接收者邮箱
*/
@Email(message = "邮箱格式不正确")
String receiverEmail;
}