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