| 24383 |
amit.gupta |
1 |
package com.spice.profitmandi.dao.entity.cs;
|
|
|
2 |
|
|
|
3 |
import java.time.LocalDateTime;
|
|
|
4 |
|
|
|
5 |
import javax.persistence.Column;
|
|
|
6 |
import javax.persistence.Entity;
|
|
|
7 |
import javax.persistence.EnumType;
|
|
|
8 |
import javax.persistence.Enumerated;
|
|
|
9 |
import javax.persistence.Id;
|
|
|
10 |
import javax.persistence.Table;
|
|
|
11 |
|
|
|
12 |
import com.spice.profitmandi.dao.entity.fofo.ActivityType;
|
|
|
13 |
|
|
|
14 |
/**
|
|
|
15 |
* @author amit
|
|
|
16 |
*
|
|
|
17 |
*/
|
|
|
18 |
@Entity
|
|
|
19 |
@Table(name="cs.ticket", schema = "cs")
|
|
|
20 |
public class Ticket {
|
|
|
21 |
|
|
|
22 |
public static final int L2EscalationDays = 5;
|
|
|
23 |
public static final int L3EscalationDays = 10;
|
|
|
24 |
public static final int FinalEscalationDays = 15;
|
|
|
25 |
|
|
|
26 |
@Id
|
|
|
27 |
@Column
|
|
|
28 |
private int id;
|
|
|
29 |
|
|
|
30 |
@Column(name="fofo_id")
|
|
|
31 |
private int fofoId;
|
|
|
32 |
|
|
|
33 |
@Column(name="assignee_id")
|
|
|
34 |
private int assigneeId;
|
|
|
35 |
|
|
|
36 |
@Column(name="subcategory_id")
|
|
|
37 |
private int subCategoryId;
|
|
|
38 |
|
|
|
39 |
@Column(name="create_timestamp")
|
|
|
40 |
private LocalDateTime createTimestamp;
|
|
|
41 |
|
|
|
42 |
@Column(name="update_timestamp")
|
|
|
43 |
private LocalDateTime updateTimestamp;
|
|
|
44 |
|
|
|
45 |
@Column(name="close_timestamp")
|
|
|
46 |
private LocalDateTime closeTimestamp;
|
|
|
47 |
|
|
|
48 |
@Column(name="happy_code")
|
|
|
49 |
private String happyCode;
|
|
|
50 |
|
| 24384 |
amit.gupta |
51 |
@Column(name="last_activity")
|
| 24383 |
amit.gupta |
52 |
@Enumerated(EnumType.STRING)
|
|
|
53 |
private ActivityType lastActivity;
|
|
|
54 |
|
|
|
55 |
@Column(name="l2_escalation_timestamp")
|
|
|
56 |
private LocalDateTime l2EscalationTimestamp;
|
|
|
57 |
|
|
|
58 |
@Column(name="l3_escalation_timestamp")
|
|
|
59 |
private LocalDateTime l3EscalationTimestamp;
|
|
|
60 |
|
|
|
61 |
@Column(name="last_escalation_timestamp")
|
|
|
62 |
private LocalDateTime lastEscalationTimestamp;
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
@Override
|
|
|
66 |
public int hashCode() {
|
|
|
67 |
final int prime = 31;
|
|
|
68 |
int result = 1;
|
|
|
69 |
result = prime * result + assigneeId;
|
|
|
70 |
result = prime * result + ((closeTimestamp == null) ? 0 : closeTimestamp.hashCode());
|
|
|
71 |
result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
|
|
|
72 |
result = prime * result + fofoId;
|
|
|
73 |
result = prime * result + ((happyCode == null) ? 0 : happyCode.hashCode());
|
|
|
74 |
result = prime * result + id;
|
|
|
75 |
result = prime * result + ((l2EscalationTimestamp == null) ? 0 : l2EscalationTimestamp.hashCode());
|
|
|
76 |
result = prime * result + ((l3EscalationTimestamp == null) ? 0 : l3EscalationTimestamp.hashCode());
|
|
|
77 |
result = prime * result + ((lastActivity == null) ? 0 : lastActivity.hashCode());
|
|
|
78 |
result = prime * result + ((lastEscalationTimestamp == null) ? 0 : lastEscalationTimestamp.hashCode());
|
|
|
79 |
result = prime * result + subCategoryId;
|
|
|
80 |
result = prime * result + ((updateTimestamp == null) ? 0 : updateTimestamp.hashCode());
|
|
|
81 |
return result;
|
|
|
82 |
}
|
|
|
83 |
|
|
|
84 |
|
|
|
85 |
@Override
|
|
|
86 |
public boolean equals(Object obj) {
|
|
|
87 |
if (this == obj)
|
|
|
88 |
return true;
|
|
|
89 |
if (obj == null)
|
|
|
90 |
return false;
|
|
|
91 |
if (getClass() != obj.getClass())
|
|
|
92 |
return false;
|
|
|
93 |
Ticket other = (Ticket) obj;
|
|
|
94 |
if (assigneeId != other.assigneeId)
|
|
|
95 |
return false;
|
|
|
96 |
if (closeTimestamp == null) {
|
|
|
97 |
if (other.closeTimestamp != null)
|
|
|
98 |
return false;
|
|
|
99 |
} else if (!closeTimestamp.equals(other.closeTimestamp))
|
|
|
100 |
return false;
|
|
|
101 |
if (createTimestamp == null) {
|
|
|
102 |
if (other.createTimestamp != null)
|
|
|
103 |
return false;
|
|
|
104 |
} else if (!createTimestamp.equals(other.createTimestamp))
|
|
|
105 |
return false;
|
|
|
106 |
if (fofoId != other.fofoId)
|
|
|
107 |
return false;
|
|
|
108 |
if (happyCode == null) {
|
|
|
109 |
if (other.happyCode != null)
|
|
|
110 |
return false;
|
|
|
111 |
} else if (!happyCode.equals(other.happyCode))
|
|
|
112 |
return false;
|
|
|
113 |
if (id != other.id)
|
|
|
114 |
return false;
|
|
|
115 |
if (l2EscalationTimestamp == null) {
|
|
|
116 |
if (other.l2EscalationTimestamp != null)
|
|
|
117 |
return false;
|
|
|
118 |
} else if (!l2EscalationTimestamp.equals(other.l2EscalationTimestamp))
|
|
|
119 |
return false;
|
|
|
120 |
if (l3EscalationTimestamp == null) {
|
|
|
121 |
if (other.l3EscalationTimestamp != null)
|
|
|
122 |
return false;
|
|
|
123 |
} else if (!l3EscalationTimestamp.equals(other.l3EscalationTimestamp))
|
|
|
124 |
return false;
|
|
|
125 |
if (lastActivity != other.lastActivity)
|
|
|
126 |
return false;
|
|
|
127 |
if (lastEscalationTimestamp == null) {
|
|
|
128 |
if (other.lastEscalationTimestamp != null)
|
|
|
129 |
return false;
|
|
|
130 |
} else if (!lastEscalationTimestamp.equals(other.lastEscalationTimestamp))
|
|
|
131 |
return false;
|
|
|
132 |
if (subCategoryId != other.subCategoryId)
|
|
|
133 |
return false;
|
|
|
134 |
if (updateTimestamp == null) {
|
|
|
135 |
if (other.updateTimestamp != null)
|
|
|
136 |
return false;
|
|
|
137 |
} else if (!updateTimestamp.equals(other.updateTimestamp))
|
|
|
138 |
return false;
|
|
|
139 |
return true;
|
|
|
140 |
}
|
|
|
141 |
|
|
|
142 |
|
|
|
143 |
public int getId() {
|
|
|
144 |
return id;
|
|
|
145 |
}
|
|
|
146 |
|
|
|
147 |
|
|
|
148 |
public void setId(int id) {
|
|
|
149 |
this.id = id;
|
|
|
150 |
}
|
|
|
151 |
|
|
|
152 |
|
|
|
153 |
public int getFofoId() {
|
|
|
154 |
return fofoId;
|
|
|
155 |
}
|
|
|
156 |
|
|
|
157 |
|
|
|
158 |
public void setFofoId(int fofoId) {
|
|
|
159 |
this.fofoId = fofoId;
|
|
|
160 |
}
|
|
|
161 |
|
|
|
162 |
|
|
|
163 |
public int getAssigneeId() {
|
|
|
164 |
return assigneeId;
|
|
|
165 |
}
|
|
|
166 |
|
|
|
167 |
|
|
|
168 |
public void setAssigneeId(int assigneeId) {
|
|
|
169 |
this.assigneeId = assigneeId;
|
|
|
170 |
}
|
|
|
171 |
|
|
|
172 |
|
|
|
173 |
public int getSubCategoryId() {
|
|
|
174 |
return subCategoryId;
|
|
|
175 |
}
|
|
|
176 |
|
|
|
177 |
|
|
|
178 |
public void setSubCategoryId(int subCategoryId) {
|
|
|
179 |
this.subCategoryId = subCategoryId;
|
|
|
180 |
}
|
|
|
181 |
|
|
|
182 |
|
|
|
183 |
public LocalDateTime getCreateTimestamp() {
|
|
|
184 |
return createTimestamp;
|
|
|
185 |
}
|
|
|
186 |
|
|
|
187 |
|
|
|
188 |
public void setCreateTimestamp(LocalDateTime createTimestamp) {
|
|
|
189 |
this.createTimestamp = createTimestamp;
|
|
|
190 |
}
|
|
|
191 |
|
|
|
192 |
|
|
|
193 |
public LocalDateTime getUpdateTimestamp() {
|
|
|
194 |
return updateTimestamp;
|
|
|
195 |
}
|
|
|
196 |
|
|
|
197 |
|
|
|
198 |
public void setUpdateTimestamp(LocalDateTime updateTimestamp) {
|
|
|
199 |
this.updateTimestamp = updateTimestamp;
|
|
|
200 |
}
|
|
|
201 |
|
|
|
202 |
|
|
|
203 |
public LocalDateTime getCloseTimestamp() {
|
|
|
204 |
return closeTimestamp;
|
|
|
205 |
}
|
|
|
206 |
|
|
|
207 |
|
|
|
208 |
public void setCloseTimestamp(LocalDateTime closeTimestamp) {
|
|
|
209 |
this.closeTimestamp = closeTimestamp;
|
|
|
210 |
}
|
|
|
211 |
|
|
|
212 |
|
|
|
213 |
public String getHappyCode() {
|
|
|
214 |
return happyCode;
|
|
|
215 |
}
|
|
|
216 |
|
|
|
217 |
|
|
|
218 |
public void setHappyCode(String happyCode) {
|
|
|
219 |
this.happyCode = happyCode;
|
|
|
220 |
}
|
|
|
221 |
|
|
|
222 |
|
|
|
223 |
public ActivityType getLastActivity() {
|
|
|
224 |
return lastActivity;
|
|
|
225 |
}
|
|
|
226 |
|
|
|
227 |
|
|
|
228 |
public void setLastActivity(ActivityType lastActivity) {
|
|
|
229 |
this.lastActivity = lastActivity;
|
|
|
230 |
}
|
|
|
231 |
|
|
|
232 |
|
|
|
233 |
public LocalDateTime getL2EscalationTimestamp() {
|
|
|
234 |
return l2EscalationTimestamp;
|
|
|
235 |
}
|
|
|
236 |
|
|
|
237 |
|
|
|
238 |
public void setL2EscalationTimestamp(LocalDateTime l2EscalationTimestamp) {
|
|
|
239 |
this.l2EscalationTimestamp = l2EscalationTimestamp;
|
|
|
240 |
}
|
|
|
241 |
|
|
|
242 |
|
|
|
243 |
public LocalDateTime getL3EscalationTimestamp() {
|
|
|
244 |
return l3EscalationTimestamp;
|
|
|
245 |
}
|
|
|
246 |
|
|
|
247 |
|
|
|
248 |
public void setL3EscalationTimestamp(LocalDateTime l3EscalationTimestamp) {
|
|
|
249 |
this.l3EscalationTimestamp = l3EscalationTimestamp;
|
|
|
250 |
}
|
|
|
251 |
|
|
|
252 |
|
|
|
253 |
public LocalDateTime getLastEscalationTimestamp() {
|
|
|
254 |
return lastEscalationTimestamp;
|
|
|
255 |
}
|
|
|
256 |
|
|
|
257 |
|
|
|
258 |
public void setLastEscalationTimestamp(LocalDateTime lastEscalationTimestamp) {
|
|
|
259 |
this.lastEscalationTimestamp = lastEscalationTimestamp;
|
|
|
260 |
}
|
|
|
261 |
|
|
|
262 |
|
|
|
263 |
public static int getL2escalationdays() {
|
|
|
264 |
return L2EscalationDays;
|
|
|
265 |
}
|
|
|
266 |
|
|
|
267 |
|
|
|
268 |
public static int getL3escalationdays() {
|
|
|
269 |
return L3EscalationDays;
|
|
|
270 |
}
|
|
|
271 |
|
|
|
272 |
|
|
|
273 |
public static int getFinalescalationdays() {
|
|
|
274 |
return FinalEscalationDays;
|
|
|
275 |
}
|
|
|
276 |
|
|
|
277 |
|
|
|
278 |
@Override
|
|
|
279 |
public String toString() {
|
|
|
280 |
return "Ticket [id=" + id + ", fofoId=" + fofoId + ", assigneeId=" + assigneeId + ", subCategoryId="
|
|
|
281 |
+ subCategoryId + ", createTimestamp=" + createTimestamp + ", updateTimestamp=" + updateTimestamp
|
|
|
282 |
+ ", closeTimestamp=" + closeTimestamp + ", happyCode=" + happyCode + ", lastActivity=" + lastActivity
|
|
|
283 |
+ ", l2EscalationTimestamp=" + l2EscalationTimestamp + ", l3EscalationTimestamp="
|
|
|
284 |
+ l3EscalationTimestamp + ", lastEscalationTimestamp=" + lastEscalationTimestamp + "]";
|
|
|
285 |
}
|
|
|
286 |
|
|
|
287 |
|
|
|
288 |
|
|
|
289 |
|
|
|
290 |
|
|
|
291 |
}
|