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