AnnouncementCreateRequest.java
3.34 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
/*
* @(#)AnnouncementCreateRequest.java
*
* Copyright (c) 2014-2017 版权所有
* xiniunet. All rights reserved.
*
* This software is the confidential and proprietary
* information of xiniunet.
* ("Confidential Information"). You shall not disclose
* such Confidential Information and shall use it only
* in accordance with the terms of the contract agreement
* you entered into with xiniunet.
*/
package com.xiniunet.announcement.request;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.xiniunet.announcement.domain.AnnouncementUser;
import com.xiniunet.framework.base.BaseRequest;
import com.xiniunet.task.domain.FileAttachmentBind;
import com.xiniunet.task.domain.TaskUser;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;
/**
* 创建公告通知的请求.
* @author
*/
public class AnnouncementCreateRequest extends BaseRequest {
/**
* 标题
*
*/
@Length(min=0, max=100, message = "标题长度不合法")
private String title;
/**
* 内容
*
*/
@Length(min=0, max=3000, message = "内容长度不合法")
private String content;
/**
* 发布公告人的ID
*
*/
private Long ownerUserId;
/**
* 发布公告人的名称
*
*/
@Length(min=0, max=100, message = "发布公告人的名称长度不合法")
private String ownerUserName;
/**
* 公告发布时间
*
*/
private Date announcementTime;
/**
* 通知者id集合
*/
private List<AnnouncementUser> userList;
/**
* 附件集合
*/
private List<FileAttachmentBind> attachmentList;
public List<AnnouncementUser> getUserList() {
return userList;
}
public void setUserList(List<AnnouncementUser> userList) {
this.userList = userList;
}
public void setUserList(String userList) {
this.userList = JSONObject.parseArray(userList,AnnouncementUser.class);
}
public List<FileAttachmentBind> getAttachmentList() {
return attachmentList;
}
public void setAttachmentList(List<FileAttachmentBind> attachmentList) {
this.attachmentList = attachmentList;
}
public void setAttachmentList(String attachmentList) {
this.attachmentList = JSON.parseArray(attachmentList, FileAttachmentBind.class);
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Long getOwnerUserId() {
return ownerUserId;
}
public void setOwnerUserId(Long ownerUserId) {
this.ownerUserId = ownerUserId;
}
public String getOwnerUserName() {
return ownerUserName;
}
public void setOwnerUserName(String ownerUserName) {
this.ownerUserName = ownerUserName;
}
public Date getAnnouncementTime() {
return announcementTime;
}
public void setAnnouncementTime(Date announcementTime) {
this.announcementTime = announcementTime;
}
}