| 36787 |
ranu |
1 |
package com.spice.profitmandi.dao.entity.user;
|
|
|
2 |
|
|
|
3 |
import javax.persistence.*;
|
|
|
4 |
import java.time.LocalDate;
|
|
|
5 |
import java.time.LocalDateTime;
|
|
|
6 |
|
|
|
7 |
/**
|
|
|
8 |
* A request to schedule a visit / telephonic follow-up for a lead.
|
|
|
9 |
* Created when lead-management picks an assignee but no upcoming beat is
|
|
|
10 |
* available for that assignee — instead of failing, lead-mgmt fires a
|
|
|
11 |
* request to the assignee's hierarchy. The head (any level up) sees it
|
|
|
12 |
* inside the Plan-a-Beat window and either:
|
|
|
13 |
* - Schedules it onto a beat-day (writes a LeadRoute, status -> SCHEDULED)
|
|
|
14 |
* - Reassigns to a different downline sales user
|
|
|
15 |
* - Rejects with a reason
|
|
|
16 |
* <p>
|
|
|
17 |
* Kept separate from beat_deferred_visit on purpose — the deferred entity
|
|
|
18 |
* is about a planned visit that DID NOT HAPPEN; this is about a visit that
|
|
|
19 |
* isn't yet on any beat at all.
|
|
|
20 |
* <p>
|
|
|
21 |
* status: PENDING | SCHEDULED | REJECTED | CANCELLED
|
|
|
22 |
* communicationType: VISIT | TELEPHONIC
|
|
|
23 |
*/
|
|
|
24 |
@Entity
|
|
|
25 |
@Table(name = "user.lead_visit_request")
|
|
|
26 |
public class LeadVisitRequest {
|
|
|
27 |
|
|
|
28 |
@Id
|
|
|
29 |
@Column(name = "id", unique = true, updatable = false)
|
|
|
30 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
31 |
private int id;
|
|
|
32 |
|
|
|
33 |
@Column(name = "lead_id")
|
|
|
34 |
private int leadId;
|
|
|
35 |
|
|
|
36 |
@Column(name = "assignee_auth_id")
|
|
|
37 |
private int assigneeAuthId;
|
|
|
38 |
|
|
|
39 |
@Column(name = "requested_by_auth_id")
|
|
|
40 |
private int requestedByAuthId;
|
|
|
41 |
|
|
|
42 |
@Column(name = "communication_type")
|
|
|
43 |
private String communicationType;
|
|
|
44 |
|
|
|
45 |
@Column(name = "nearest_store_id")
|
|
|
46 |
private Integer nearestStoreId;
|
|
|
47 |
|
|
|
48 |
@Column(name = "requested_date")
|
|
|
49 |
private LocalDate requestedDate;
|
|
|
50 |
|
|
|
51 |
@Column(name = "reason")
|
|
|
52 |
private String reason;
|
|
|
53 |
|
|
|
54 |
@Column(name = "status")
|
|
|
55 |
private String status;
|
|
|
56 |
|
|
|
57 |
@Column(name = "reject_reason")
|
|
|
58 |
private String rejectReason;
|
|
|
59 |
|
|
|
60 |
@Column(name = "action_by_auth_id")
|
|
|
61 |
private Integer actionByAuthId;
|
|
|
62 |
|
|
|
63 |
@Column(name = "action_timestamp")
|
|
|
64 |
private LocalDateTime actionTimestamp;
|
|
|
65 |
|
|
|
66 |
@Column(name = "beat_id")
|
|
|
67 |
private Integer beatId;
|
|
|
68 |
|
|
|
69 |
@Column(name = "schedule_date")
|
|
|
70 |
private LocalDate scheduleDate;
|
|
|
71 |
|
|
|
72 |
@Column(name = "created_timestamp")
|
|
|
73 |
private LocalDateTime createdTimestamp;
|
|
|
74 |
|
|
|
75 |
@Column(name = "updated_timestamp")
|
|
|
76 |
private LocalDateTime updatedTimestamp;
|
|
|
77 |
|
|
|
78 |
public int getId() {
|
|
|
79 |
return id;
|
|
|
80 |
}
|
|
|
81 |
|
|
|
82 |
public void setId(int id) {
|
|
|
83 |
this.id = id;
|
|
|
84 |
}
|
|
|
85 |
|
|
|
86 |
public int getLeadId() {
|
|
|
87 |
return leadId;
|
|
|
88 |
}
|
|
|
89 |
|
|
|
90 |
public void setLeadId(int leadId) {
|
|
|
91 |
this.leadId = leadId;
|
|
|
92 |
}
|
|
|
93 |
|
|
|
94 |
public int getAssigneeAuthId() {
|
|
|
95 |
return assigneeAuthId;
|
|
|
96 |
}
|
|
|
97 |
|
|
|
98 |
public void setAssigneeAuthId(int assigneeAuthId) {
|
|
|
99 |
this.assigneeAuthId = assigneeAuthId;
|
|
|
100 |
}
|
|
|
101 |
|
|
|
102 |
public int getRequestedByAuthId() {
|
|
|
103 |
return requestedByAuthId;
|
|
|
104 |
}
|
|
|
105 |
|
|
|
106 |
public void setRequestedByAuthId(int requestedByAuthId) {
|
|
|
107 |
this.requestedByAuthId = requestedByAuthId;
|
|
|
108 |
}
|
|
|
109 |
|
|
|
110 |
public String getCommunicationType() {
|
|
|
111 |
return communicationType;
|
|
|
112 |
}
|
|
|
113 |
|
|
|
114 |
public void setCommunicationType(String communicationType) {
|
|
|
115 |
this.communicationType = communicationType;
|
|
|
116 |
}
|
|
|
117 |
|
|
|
118 |
public Integer getNearestStoreId() {
|
|
|
119 |
return nearestStoreId;
|
|
|
120 |
}
|
|
|
121 |
|
|
|
122 |
public void setNearestStoreId(Integer nearestStoreId) {
|
|
|
123 |
this.nearestStoreId = nearestStoreId;
|
|
|
124 |
}
|
|
|
125 |
|
|
|
126 |
public LocalDate getRequestedDate() {
|
|
|
127 |
return requestedDate;
|
|
|
128 |
}
|
|
|
129 |
|
|
|
130 |
public void setRequestedDate(LocalDate requestedDate) {
|
|
|
131 |
this.requestedDate = requestedDate;
|
|
|
132 |
}
|
|
|
133 |
|
|
|
134 |
public String getReason() {
|
|
|
135 |
return reason;
|
|
|
136 |
}
|
|
|
137 |
|
|
|
138 |
public void setReason(String reason) {
|
|
|
139 |
this.reason = reason;
|
|
|
140 |
}
|
|
|
141 |
|
|
|
142 |
public String getStatus() {
|
|
|
143 |
return status;
|
|
|
144 |
}
|
|
|
145 |
|
|
|
146 |
public void setStatus(String status) {
|
|
|
147 |
this.status = status;
|
|
|
148 |
}
|
|
|
149 |
|
|
|
150 |
public String getRejectReason() {
|
|
|
151 |
return rejectReason;
|
|
|
152 |
}
|
|
|
153 |
|
|
|
154 |
public void setRejectReason(String rejectReason) {
|
|
|
155 |
this.rejectReason = rejectReason;
|
|
|
156 |
}
|
|
|
157 |
|
|
|
158 |
public Integer getActionByAuthId() {
|
|
|
159 |
return actionByAuthId;
|
|
|
160 |
}
|
|
|
161 |
|
|
|
162 |
public void setActionByAuthId(Integer actionByAuthId) {
|
|
|
163 |
this.actionByAuthId = actionByAuthId;
|
|
|
164 |
}
|
|
|
165 |
|
|
|
166 |
public LocalDateTime getActionTimestamp() {
|
|
|
167 |
return actionTimestamp;
|
|
|
168 |
}
|
|
|
169 |
|
|
|
170 |
public void setActionTimestamp(LocalDateTime actionTimestamp) {
|
|
|
171 |
this.actionTimestamp = actionTimestamp;
|
|
|
172 |
}
|
|
|
173 |
|
|
|
174 |
public Integer getBeatId() {
|
|
|
175 |
return beatId;
|
|
|
176 |
}
|
|
|
177 |
|
|
|
178 |
public void setBeatId(Integer beatId) {
|
|
|
179 |
this.beatId = beatId;
|
|
|
180 |
}
|
|
|
181 |
|
|
|
182 |
public LocalDate getScheduleDate() {
|
|
|
183 |
return scheduleDate;
|
|
|
184 |
}
|
|
|
185 |
|
|
|
186 |
public void setScheduleDate(LocalDate scheduleDate) {
|
|
|
187 |
this.scheduleDate = scheduleDate;
|
|
|
188 |
}
|
|
|
189 |
|
|
|
190 |
public LocalDateTime getCreatedTimestamp() {
|
|
|
191 |
return createdTimestamp;
|
|
|
192 |
}
|
|
|
193 |
|
|
|
194 |
public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
|
|
|
195 |
this.createdTimestamp = createdTimestamp;
|
|
|
196 |
}
|
|
|
197 |
|
|
|
198 |
public LocalDateTime getUpdatedTimestamp() {
|
|
|
199 |
return updatedTimestamp;
|
|
|
200 |
}
|
|
|
201 |
|
|
|
202 |
public void setUpdatedTimestamp(LocalDateTime updatedTimestamp) {
|
|
|
203 |
this.updatedTimestamp = updatedTimestamp;
|
|
|
204 |
}
|
|
|
205 |
}
|