Subversion Repositories SmartDukaan

Rev

Rev 29500 | Rev 31370 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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