1
|
|
|
package com.base.Models; |
2
|
|
|
|
3
|
|
|
public class Message extends BaseModel { |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Message content |
7
|
|
|
*/ |
8
|
|
|
private String content; |
9
|
|
|
|
10
|
|
|
/** |
11
|
|
|
* Message type |
12
|
|
|
*/ |
13
|
|
|
private String type; |
14
|
|
|
|
15
|
|
|
/** |
16
|
|
|
* Message thread_id |
17
|
|
|
*/ |
18
|
|
|
private String thread_id; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* Message sender_id |
22
|
|
|
*/ |
23
|
|
|
private String sender_id; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* Message sender_type |
27
|
|
|
*/ |
28
|
|
|
private String sender_type; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* Message slug |
32
|
|
|
*/ |
33
|
|
|
private String slug; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* Message Sender |
37
|
|
|
*/ |
38
|
|
|
private User sender; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* Message Attachments |
42
|
|
|
*/ |
43
|
|
|
private Media[] attachments; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* Message Thread |
47
|
|
|
*/ |
48
|
|
|
private Thread thread; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* Get Message Sender |
52
|
|
|
* |
53
|
|
|
* @return User |
54
|
|
|
*/ |
55
|
|
|
public User getSender() { |
56
|
|
|
return sender; |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* Set Message Sender |
61
|
|
|
* |
62
|
|
|
* @param sender |
63
|
|
|
* @return |
64
|
|
|
*/ |
65
|
|
|
public Message setSender(User sender) { |
66
|
|
|
this.sender = sender; |
67
|
|
|
return this; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* Message Content |
72
|
|
|
* |
73
|
|
|
* @return Content |
74
|
|
|
*/ |
75
|
|
|
public String getContent() { |
76
|
|
|
return content; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* Set Message Content |
81
|
|
|
* |
82
|
|
|
* @param content |
83
|
|
|
* @return |
84
|
|
|
*/ |
85
|
|
|
public Message setContent(String content) { |
86
|
|
|
this.content = content; |
87
|
|
|
return this; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* Message Type |
92
|
|
|
* |
93
|
|
|
* @return Type |
94
|
|
|
*/ |
95
|
|
|
public String getType() { |
96
|
|
|
return type; |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* Set Message Type |
101
|
|
|
* |
102
|
|
|
* @param type |
103
|
|
|
* @return |
104
|
|
|
*/ |
105
|
|
|
public Message setType(String type) { |
106
|
|
|
this.type = type; |
107
|
|
|
return this; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* Message Thread_id |
112
|
|
|
* |
113
|
|
|
* @return Thread_id |
114
|
|
|
*/ |
115
|
|
|
public String getThread_id() { |
|
|
|
|
116
|
|
|
return thread_id; |
117
|
|
|
} |
118
|
|
|
|
119
|
|
|
/** |
120
|
|
|
* Set Message Thread_id |
121
|
|
|
* |
122
|
|
|
* @param thread_id |
123
|
|
|
* @return |
124
|
|
|
*/ |
125
|
|
|
public Message setThread_id(String thread_id) { |
|
|
|
|
126
|
|
|
this.thread_id = thread_id; |
127
|
|
|
return this; |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* Message Sender_id |
132
|
|
|
* |
133
|
|
|
* @return Sender_id |
134
|
|
|
*/ |
135
|
|
|
public String getSender_id() { |
|
|
|
|
136
|
|
|
return sender_id; |
137
|
|
|
} |
138
|
|
|
|
139
|
|
|
/** |
140
|
|
|
* Set Message Sender_id |
141
|
|
|
* |
142
|
|
|
* @param sender_id |
143
|
|
|
* @return |
144
|
|
|
*/ |
145
|
|
|
public Message setSender_id(String sender_id) { |
|
|
|
|
146
|
|
|
this.sender_id = sender_id; |
147
|
|
|
return this; |
148
|
|
|
} |
149
|
|
|
|
150
|
|
|
/** |
151
|
|
|
* Message Sender_type |
152
|
|
|
* |
153
|
|
|
* @return Sender_type |
154
|
|
|
*/ |
155
|
|
|
public String getSender_type() { |
|
|
|
|
156
|
|
|
return sender_type; |
157
|
|
|
} |
158
|
|
|
|
159
|
|
|
/** |
160
|
|
|
* Set Message Sender_type |
161
|
|
|
* |
162
|
|
|
* @param sender_type |
163
|
|
|
* @return |
164
|
|
|
*/ |
165
|
|
|
public Message setSender_type(String sender_type) { |
|
|
|
|
166
|
|
|
this.sender_type = sender_type; |
167
|
|
|
return this; |
168
|
|
|
} |
169
|
|
|
|
170
|
|
|
/** |
171
|
|
|
* Message Slug |
172
|
|
|
* |
173
|
|
|
* @return Slug |
174
|
|
|
*/ |
175
|
|
|
public String getSlug() { |
176
|
|
|
return slug; |
177
|
|
|
} |
178
|
|
|
|
179
|
|
|
/** |
180
|
|
|
* Set Message Slug |
181
|
|
|
* |
182
|
|
|
* @param slug |
183
|
|
|
* @return |
184
|
|
|
*/ |
185
|
|
|
public Message setSlug(String slug) { |
186
|
|
|
this.slug = slug; |
187
|
|
|
return this; |
188
|
|
|
} |
189
|
|
|
|
190
|
|
|
public Media[] getAttachments() { |
191
|
|
|
return attachments; |
192
|
|
|
} |
193
|
|
|
|
194
|
|
|
public Message setAttachments(Media[] attachments) { |
195
|
|
|
this.attachments = attachments; |
196
|
|
|
return this; |
197
|
|
|
} |
198
|
|
|
|
199
|
|
|
public Thread getThread() { |
200
|
|
|
return thread; |
201
|
|
|
} |
202
|
|
|
|
203
|
|
|
public Message setThread(Thread thread) { |
204
|
|
|
this.thread = thread; |
205
|
|
|
return this; |
206
|
|
|
} |
207
|
|
|
} |
208
|
|
|
|