Guestbook.java
2.93 KB
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
/**
* Copyright © 2015-2018 ODM All rights reserved.
*/
package com.thinkgem.jeesite.modules.cms.entity;
import java.util.Date;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.Length;
import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.IdGen;
import com.thinkgem.jeesite.modules.sys.entity.User;
/**
* 留言Entity
* @author ThinkGem
* @version 2013-05-15
*/
public class Guestbook extends DataEntity<Guestbook> {
private static final long serialVersionUID = 1L;
private String type; // 留言分类(咨询、建议、投诉、其它)
private String content; // 留言内容
private String name; // 姓名
private String email; // 邮箱
private String phone; // 电话
private String workunit;// 单位
private String ip; // 留言IP
private Date createDate;// 留言时间
private User reUser; // 回复人
private Date reDate; // 回复时间
private String reContent;// 回复内容
private String delFlag; // 删除标记删除标记(0:正常;1:删除;2:审核)
public Guestbook() {
this.delFlag = DEL_FLAG_AUDIT;
}
public Guestbook(String id){
this();
this.id = id;
}
public void prePersist(){
this.id = IdGen.uuid();
this.createDate = new Date();
}
@Length(min=1, max=100)
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Length(min=1, max=2000)
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
@Length(min=1, max=100)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Email @Length(min=0, max=100)
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
@Length(min=0, max=100)
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
@Length(min=0, max=100)
public String getWorkunit() {
return workunit;
}
public void setWorkunit(String workunit) {
this.workunit = workunit;
}
@Length(min=1, max=100)
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
@NotNull
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public User getReUser() {
return reUser;
}
public void setReUser(User reUser) {
this.reUser = reUser;
}
public String getReContent() {
return reContent;
}
public void setReContent(String reContent) {
this.reContent = reContent;
}
public Date getReDate() {
return reDate;
}
public void setReDate(Date reDate) {
this.reDate = reDate;
}
@Length(min=1, max=1)
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
}