| 25899 |
tejbeer |
1 |
package com.spice.profitmandi.dao.entity.user;
|
|
|
2 |
|
|
|
3 |
import java.time.LocalDateTime;
|
| 29317 |
tejbeer |
4 |
import java.util.List;
|
| 25899 |
tejbeer |
5 |
|
|
|
6 |
import javax.persistence.Column;
|
|
|
7 |
import javax.persistence.Entity;
|
|
|
8 |
import javax.persistence.EnumType;
|
|
|
9 |
import javax.persistence.Enumerated;
|
|
|
10 |
import javax.persistence.GeneratedValue;
|
|
|
11 |
import javax.persistence.GenerationType;
|
|
|
12 |
import javax.persistence.Id;
|
|
|
13 |
import javax.persistence.Table;
|
| 25916 |
amit.gupta |
14 |
import javax.persistence.Transient;
|
| 25899 |
tejbeer |
15 |
|
|
|
16 |
import com.spice.profitmandi.dao.enumuration.dtr.LeadStatus;
|
|
|
17 |
|
|
|
18 |
@Entity
|
|
|
19 |
@Table(name = "user.lead", schema = "user")
|
|
|
20 |
public class Lead {
|
|
|
21 |
@Id
|
|
|
22 |
@Column(name = "id", unique = true, updatable = false)
|
|
|
23 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
24 |
private int id;
|
|
|
25 |
|
|
|
26 |
@Column(name = "first_name")
|
|
|
27 |
private String firstName;
|
|
|
28 |
|
| 25979 |
tejbeer |
29 |
@Column(name = "source")
|
|
|
30 |
private String source;
|
|
|
31 |
|
| 26244 |
tejbeer |
32 |
@Column(name = "color")
|
|
|
33 |
private String color;
|
|
|
34 |
|
| 29317 |
tejbeer |
35 |
@Transient
|
|
|
36 |
private List<LeadActivity> leadActivities;
|
|
|
37 |
|
|
|
38 |
|
|
|
39 |
|
|
|
40 |
public List<LeadActivity> getLeadActivities() {
|
|
|
41 |
return leadActivities;
|
|
|
42 |
}
|
|
|
43 |
|
|
|
44 |
public void setLeadActivities(List<LeadActivity> leadActivities) {
|
|
|
45 |
this.leadActivities = leadActivities;
|
|
|
46 |
}
|
|
|
47 |
|
| 28200 |
tejbeer |
48 |
@Column(name = "notinterested_reason")
|
|
|
49 |
public String notinterestedReason;
|
|
|
50 |
|
|
|
51 |
public String getNotinterestedReason() {
|
|
|
52 |
return notinterestedReason;
|
|
|
53 |
}
|
|
|
54 |
|
|
|
55 |
public void setNotinterestedReason(String notinterestedReason) {
|
|
|
56 |
this.notinterestedReason = notinterestedReason;
|
|
|
57 |
}
|
|
|
58 |
|
| 26244 |
tejbeer |
59 |
public String getColor() {
|
|
|
60 |
return color;
|
|
|
61 |
}
|
|
|
62 |
|
|
|
63 |
public void setColor(String color) {
|
|
|
64 |
this.color = color;
|
|
|
65 |
}
|
|
|
66 |
|
| 25979 |
tejbeer |
67 |
public String getSource() {
|
|
|
68 |
return source;
|
|
|
69 |
}
|
|
|
70 |
|
|
|
71 |
public void setSource(String source) {
|
|
|
72 |
this.source = source;
|
|
|
73 |
}
|
|
|
74 |
|
| 25899 |
tejbeer |
75 |
public String getFirstName() {
|
|
|
76 |
return firstName;
|
|
|
77 |
}
|
|
|
78 |
|
|
|
79 |
public void setFirstName(String firstName) {
|
|
|
80 |
this.firstName = firstName;
|
|
|
81 |
}
|
|
|
82 |
|
|
|
83 |
public String getLastName() {
|
|
|
84 |
return lastName;
|
|
|
85 |
}
|
|
|
86 |
|
|
|
87 |
public void setLastName(String lastName) {
|
|
|
88 |
this.lastName = lastName;
|
|
|
89 |
}
|
|
|
90 |
|
|
|
91 |
@Column(name = "last_name")
|
|
|
92 |
private String lastName;
|
|
|
93 |
|
|
|
94 |
@Column(length = 10, name = "mobile")
|
|
|
95 |
private String leadMobile;
|
|
|
96 |
|
|
|
97 |
@Column(name = "created_by")
|
|
|
98 |
private String createdBy;
|
|
|
99 |
|
|
|
100 |
@Column(name = "auth_id")
|
|
|
101 |
private int authId;
|
|
|
102 |
|
|
|
103 |
public int getAuthId() {
|
|
|
104 |
return authId;
|
|
|
105 |
}
|
|
|
106 |
|
| 25916 |
amit.gupta |
107 |
@Transient
|
|
|
108 |
private LeadActivity leadActivity;
|
| 26244 |
tejbeer |
109 |
|
| 27788 |
amit.gupta |
110 |
@Transient
|
|
|
111 |
private LocalDateTime scheduledTimestamp;
|
| 28200 |
tejbeer |
112 |
|
| 25916 |
amit.gupta |
113 |
public LeadActivity getLeadActivity() {
|
|
|
114 |
return leadActivity;
|
|
|
115 |
}
|
|
|
116 |
|
| 27788 |
amit.gupta |
117 |
@Override
|
|
|
118 |
public int hashCode() {
|
|
|
119 |
final int prime = 31;
|
|
|
120 |
int result = 1;
|
|
|
121 |
result = prime * result + ((address == null) ? 0 : address.hashCode());
|
|
|
122 |
result = prime * result + assignTo;
|
|
|
123 |
result = prime * result + authId;
|
|
|
124 |
result = prime * result + ((city == null) ? 0 : city.hashCode());
|
|
|
125 |
result = prime * result + ((closureTimestamp == null) ? 0 : closureTimestamp.hashCode());
|
|
|
126 |
result = prime * result + ((color == null) ? 0 : color.hashCode());
|
|
|
127 |
result = prime * result + ((createdBy == null) ? 0 : createdBy.hashCode());
|
|
|
128 |
result = prime * result + ((createdTimestamp == null) ? 0 : createdTimestamp.hashCode());
|
|
|
129 |
result = prime * result + ((firstName == null) ? 0 : firstName.hashCode());
|
|
|
130 |
result = prime * result + id;
|
|
|
131 |
result = prime * result + ((lastName == null) ? 0 : lastName.hashCode());
|
|
|
132 |
result = prime * result + ((leadActivity == null) ? 0 : leadActivity.hashCode());
|
|
|
133 |
result = prime * result + ((leadMobile == null) ? 0 : leadMobile.hashCode());
|
|
|
134 |
result = prime * result + ((scheduledTimestamp == null) ? 0 : scheduledTimestamp.hashCode());
|
|
|
135 |
result = prime * result + ((source == null) ? 0 : source.hashCode());
|
|
|
136 |
result = prime * result + ((state == null) ? 0 : state.hashCode());
|
|
|
137 |
result = prime * result + ((status == null) ? 0 : status.hashCode());
|
|
|
138 |
result = prime * result + ((updatedTimestamp == null) ? 0 : updatedTimestamp.hashCode());
|
|
|
139 |
return result;
|
|
|
140 |
}
|
|
|
141 |
|
|
|
142 |
@Override
|
|
|
143 |
public boolean equals(Object obj) {
|
|
|
144 |
if (this == obj)
|
|
|
145 |
return true;
|
|
|
146 |
if (obj == null)
|
|
|
147 |
return false;
|
|
|
148 |
if (getClass() != obj.getClass())
|
|
|
149 |
return false;
|
|
|
150 |
Lead other = (Lead) obj;
|
|
|
151 |
if (address == null) {
|
|
|
152 |
if (other.address != null)
|
|
|
153 |
return false;
|
|
|
154 |
} else if (!address.equals(other.address))
|
|
|
155 |
return false;
|
|
|
156 |
if (assignTo != other.assignTo)
|
|
|
157 |
return false;
|
|
|
158 |
if (authId != other.authId)
|
|
|
159 |
return false;
|
|
|
160 |
if (city == null) {
|
|
|
161 |
if (other.city != null)
|
|
|
162 |
return false;
|
|
|
163 |
} else if (!city.equals(other.city))
|
|
|
164 |
return false;
|
|
|
165 |
if (closureTimestamp == null) {
|
|
|
166 |
if (other.closureTimestamp != null)
|
|
|
167 |
return false;
|
|
|
168 |
} else if (!closureTimestamp.equals(other.closureTimestamp))
|
|
|
169 |
return false;
|
|
|
170 |
if (color == null) {
|
|
|
171 |
if (other.color != null)
|
|
|
172 |
return false;
|
|
|
173 |
} else if (!color.equals(other.color))
|
|
|
174 |
return false;
|
|
|
175 |
if (createdBy == null) {
|
|
|
176 |
if (other.createdBy != null)
|
|
|
177 |
return false;
|
|
|
178 |
} else if (!createdBy.equals(other.createdBy))
|
|
|
179 |
return false;
|
|
|
180 |
if (createdTimestamp == null) {
|
|
|
181 |
if (other.createdTimestamp != null)
|
|
|
182 |
return false;
|
|
|
183 |
} else if (!createdTimestamp.equals(other.createdTimestamp))
|
|
|
184 |
return false;
|
|
|
185 |
if (firstName == null) {
|
|
|
186 |
if (other.firstName != null)
|
|
|
187 |
return false;
|
|
|
188 |
} else if (!firstName.equals(other.firstName))
|
|
|
189 |
return false;
|
|
|
190 |
if (id != other.id)
|
|
|
191 |
return false;
|
|
|
192 |
if (lastName == null) {
|
|
|
193 |
if (other.lastName != null)
|
|
|
194 |
return false;
|
|
|
195 |
} else if (!lastName.equals(other.lastName))
|
|
|
196 |
return false;
|
|
|
197 |
if (leadActivity == null) {
|
|
|
198 |
if (other.leadActivity != null)
|
|
|
199 |
return false;
|
|
|
200 |
} else if (!leadActivity.equals(other.leadActivity))
|
|
|
201 |
return false;
|
|
|
202 |
if (leadMobile == null) {
|
|
|
203 |
if (other.leadMobile != null)
|
|
|
204 |
return false;
|
|
|
205 |
} else if (!leadMobile.equals(other.leadMobile))
|
|
|
206 |
return false;
|
|
|
207 |
if (scheduledTimestamp == null) {
|
|
|
208 |
if (other.scheduledTimestamp != null)
|
|
|
209 |
return false;
|
|
|
210 |
} else if (!scheduledTimestamp.equals(other.scheduledTimestamp))
|
|
|
211 |
return false;
|
|
|
212 |
if (source == null) {
|
|
|
213 |
if (other.source != null)
|
|
|
214 |
return false;
|
|
|
215 |
} else if (!source.equals(other.source))
|
|
|
216 |
return false;
|
|
|
217 |
if (state == null) {
|
|
|
218 |
if (other.state != null)
|
|
|
219 |
return false;
|
|
|
220 |
} else if (!state.equals(other.state))
|
|
|
221 |
return false;
|
|
|
222 |
if (status != other.status)
|
|
|
223 |
return false;
|
|
|
224 |
if (updatedTimestamp == null) {
|
|
|
225 |
if (other.updatedTimestamp != null)
|
|
|
226 |
return false;
|
|
|
227 |
} else if (!updatedTimestamp.equals(other.updatedTimestamp))
|
|
|
228 |
return false;
|
|
|
229 |
return true;
|
|
|
230 |
}
|
|
|
231 |
|
|
|
232 |
public LocalDateTime getScheduledTimestamp() {
|
|
|
233 |
return scheduledTimestamp;
|
|
|
234 |
}
|
|
|
235 |
|
|
|
236 |
public void setScheduledTimestamp(LocalDateTime scheduledTimestamp) {
|
|
|
237 |
this.scheduledTimestamp = scheduledTimestamp;
|
|
|
238 |
}
|
|
|
239 |
|
| 25916 |
amit.gupta |
240 |
public void setLeadActivity(LeadActivity leadActivity) {
|
|
|
241 |
this.leadActivity = leadActivity;
|
|
|
242 |
}
|
|
|
243 |
|
| 25899 |
tejbeer |
244 |
public void setAuthId(int authId) {
|
|
|
245 |
this.authId = authId;
|
|
|
246 |
}
|
|
|
247 |
|
|
|
248 |
@Column(name = "address")
|
|
|
249 |
private String address;
|
|
|
250 |
|
|
|
251 |
@Column(name = "city")
|
|
|
252 |
private String city;
|
|
|
253 |
|
|
|
254 |
@Column(name = "state")
|
|
|
255 |
private String state;
|
|
|
256 |
|
|
|
257 |
@Column(name = "status")
|
|
|
258 |
@Enumerated(EnumType.STRING)
|
|
|
259 |
private LeadStatus status;
|
|
|
260 |
|
| 25979 |
tejbeer |
261 |
@Column(name = "assign_to")
|
|
|
262 |
private int assignTo;
|
|
|
263 |
|
| 27025 |
tejbeer |
264 |
@Column(name = "closure_timestamp")
|
|
|
265 |
private LocalDateTime closureTimestamp;
|
|
|
266 |
|
|
|
267 |
public LocalDateTime getClosureTimestamp() {
|
|
|
268 |
return closureTimestamp;
|
|
|
269 |
}
|
|
|
270 |
|
|
|
271 |
public void setClosureTimestamp(LocalDateTime closureTimestamp) {
|
|
|
272 |
this.closureTimestamp = closureTimestamp;
|
|
|
273 |
}
|
|
|
274 |
|
| 25899 |
tejbeer |
275 |
@Column(name = "created_timestamp")
|
|
|
276 |
private LocalDateTime createdTimestamp;
|
|
|
277 |
|
|
|
278 |
@Column(name = "updated_timestamp")
|
|
|
279 |
private LocalDateTime updatedTimestamp;
|
|
|
280 |
|
| 25979 |
tejbeer |
281 |
public int getAssignTo() {
|
|
|
282 |
return assignTo;
|
|
|
283 |
}
|
|
|
284 |
|
|
|
285 |
public void setAssignTo(int assignTo) {
|
|
|
286 |
this.assignTo = assignTo;
|
|
|
287 |
}
|
|
|
288 |
|
| 25899 |
tejbeer |
289 |
public int getId() {
|
|
|
290 |
return id;
|
|
|
291 |
}
|
|
|
292 |
|
|
|
293 |
public void setId(int id) {
|
|
|
294 |
this.id = id;
|
|
|
295 |
}
|
|
|
296 |
|
|
|
297 |
public String getLeadMobile() {
|
|
|
298 |
return leadMobile;
|
|
|
299 |
}
|
|
|
300 |
|
|
|
301 |
public void setLeadMobile(String leadMobile) {
|
|
|
302 |
this.leadMobile = leadMobile;
|
|
|
303 |
}
|
|
|
304 |
|
|
|
305 |
public String getCreatedBy() {
|
|
|
306 |
return createdBy;
|
|
|
307 |
}
|
|
|
308 |
|
|
|
309 |
public void setCreatedBy(String createdBy) {
|
|
|
310 |
this.createdBy = createdBy;
|
|
|
311 |
}
|
|
|
312 |
|
|
|
313 |
public String getAddress() {
|
|
|
314 |
return address;
|
|
|
315 |
}
|
|
|
316 |
|
|
|
317 |
public void setAddress(String address) {
|
|
|
318 |
this.address = address;
|
|
|
319 |
}
|
|
|
320 |
|
|
|
321 |
public String getCity() {
|
|
|
322 |
return city;
|
|
|
323 |
}
|
|
|
324 |
|
|
|
325 |
public void setCity(String city) {
|
|
|
326 |
this.city = city;
|
|
|
327 |
}
|
|
|
328 |
|
|
|
329 |
public String getState() {
|
|
|
330 |
return state;
|
|
|
331 |
}
|
|
|
332 |
|
|
|
333 |
public void setState(String state) {
|
|
|
334 |
this.state = state;
|
|
|
335 |
}
|
|
|
336 |
|
|
|
337 |
public LeadStatus getStatus() {
|
|
|
338 |
return status;
|
|
|
339 |
}
|
|
|
340 |
|
|
|
341 |
public void setStatus(LeadStatus status) {
|
|
|
342 |
this.status = status;
|
|
|
343 |
}
|
|
|
344 |
|
|
|
345 |
public LocalDateTime getCreatedTimestamp() {
|
|
|
346 |
return createdTimestamp;
|
|
|
347 |
}
|
|
|
348 |
|
|
|
349 |
public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
|
|
|
350 |
this.createdTimestamp = createdTimestamp;
|
|
|
351 |
}
|
|
|
352 |
|
|
|
353 |
public LocalDateTime getUpdatedTimestamp() {
|
|
|
354 |
return updatedTimestamp;
|
|
|
355 |
}
|
|
|
356 |
|
|
|
357 |
public void setUpdatedTimestamp(LocalDateTime updatedTimestamp) {
|
|
|
358 |
this.updatedTimestamp = updatedTimestamp;
|
|
|
359 |
}
|
|
|
360 |
|
|
|
361 |
@Override
|
|
|
362 |
public String toString() {
|
| 26244 |
tejbeer |
363 |
return "Lead [id=" + id + ", firstName=" + firstName + ", source=" + source + ", color=" + color + ", lastName="
|
|
|
364 |
+ lastName + ", leadMobile=" + leadMobile + ", createdBy=" + createdBy + ", authId=" + authId
|
| 27788 |
amit.gupta |
365 |
+ ", leadActivity=" + leadActivity + ", scheduledTimestamp=" + scheduledTimestamp + ", address="
|
|
|
366 |
+ address + ", city=" + city + ", state=" + state + ", status=" + status + ", assignTo=" + assignTo
|
|
|
367 |
+ ", closureTimestamp=" + closureTimestamp + ", createdTimestamp=" + createdTimestamp
|
|
|
368 |
+ ", updatedTimestamp=" + updatedTimestamp + "]";
|
| 25899 |
tejbeer |
369 |
}
|
|
|
370 |
|
|
|
371 |
}
|