| 36739 |
ranu |
1 |
package com.spice.profitmandi.dao.entity.user;
|
|
|
2 |
|
| 36758 |
vikas |
3 |
|
| 36762 |
vikas |
4 |
|
| 36739 |
ranu |
5 |
import javax.persistence.*;
|
|
|
6 |
import java.time.LocalDate;
|
|
|
7 |
import java.time.LocalDateTime;
|
|
|
8 |
|
|
|
9 |
/**
|
|
|
10 |
* Lifecycle record for a deferred beat item — a partner VISIT or a LEAD that
|
|
|
11 |
* wasn't done on its planned day. Whether the field user deferred it or it was
|
|
|
12 |
* auto-deferred, it lands here the same way (no source distinction). Kept
|
|
|
13 |
* separate from auth.location_tracking (the raw event log) so the deferral can
|
|
|
14 |
* be reviewed / rescheduled / cancelled with an audit trail. The beat plan
|
|
|
15 |
* (beat/beat_route/beat_schedule) is never mutated.
|
|
|
16 |
*
|
|
|
17 |
* status: DEFERRED | RESCHEDULED | CANCELLED
|
|
|
18 |
* taskType: franchisee-visit | lead
|
|
|
19 |
* task_id (fofoId) is the location_tracking task id (store id for visits, lead id for leads)
|
|
|
20 |
* displayName: readable name captured at sync time (so leads & visits both render without re-resolving)
|
|
|
21 |
*/
|
|
|
22 |
@Entity
|
|
|
23 |
@Table(name = "user.beat_deferred_visit")
|
|
|
24 |
public class BeatDeferredVisit {
|
|
|
25 |
|
|
|
26 |
@Id
|
|
|
27 |
@Column(name = "id", unique = true, updatable = false)
|
|
|
28 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
29 |
private int id;
|
|
|
30 |
|
|
|
31 |
// 0 when not tied to a specific beat (kept non-null so it participates in the
|
|
|
32 |
// (beat_id, fofo_id, auth_user_id, deferred_date) unique key)
|
|
|
33 |
@Column(name = "beat_id")
|
|
|
34 |
private int beatId;
|
|
|
35 |
|
|
|
36 |
@Column(name = "fofo_id")
|
|
|
37 |
private int fofoId;
|
|
|
38 |
|
|
|
39 |
@Column(name = "auth_user_id")
|
|
|
40 |
private int authUserId;
|
|
|
41 |
|
|
|
42 |
@Column(name = "deferred_date")
|
|
|
43 |
private LocalDate deferredDate;
|
|
|
44 |
|
|
|
45 |
@Column(name = "task_type")
|
|
|
46 |
private String taskType;
|
|
|
47 |
|
|
|
48 |
@Column(name = "display_name")
|
|
|
49 |
private String displayName;
|
|
|
50 |
|
|
|
51 |
@Column(name = "reason")
|
|
|
52 |
private String reason;
|
|
|
53 |
|
|
|
54 |
@Column(name = "status")
|
| 36762 |
vikas |
55 |
private String status;
|
| 36739 |
ranu |
56 |
|
|
|
57 |
@Column(name = "rescheduled_to_date")
|
|
|
58 |
private LocalDate rescheduledToDate;
|
|
|
59 |
|
|
|
60 |
@Column(name = "action_by")
|
|
|
61 |
private Integer actionBy;
|
|
|
62 |
|
|
|
63 |
@Column(name = "created_timestamp")
|
|
|
64 |
private LocalDateTime createdTimestamp;
|
|
|
65 |
|
|
|
66 |
@Column(name = "updated_timestamp")
|
|
|
67 |
private LocalDateTime updatedTimestamp;
|
|
|
68 |
|
|
|
69 |
public int getId() {
|
|
|
70 |
return id;
|
|
|
71 |
}
|
|
|
72 |
|
|
|
73 |
public void setId(int id) {
|
|
|
74 |
this.id = id;
|
|
|
75 |
}
|
|
|
76 |
|
|
|
77 |
public int getBeatId() {
|
|
|
78 |
return beatId;
|
|
|
79 |
}
|
|
|
80 |
|
|
|
81 |
public void setBeatId(int beatId) {
|
|
|
82 |
this.beatId = beatId;
|
|
|
83 |
}
|
|
|
84 |
|
|
|
85 |
public int getFofoId() {
|
|
|
86 |
return fofoId;
|
|
|
87 |
}
|
|
|
88 |
|
|
|
89 |
public void setFofoId(int fofoId) {
|
|
|
90 |
this.fofoId = fofoId;
|
|
|
91 |
}
|
|
|
92 |
|
|
|
93 |
public int getAuthUserId() {
|
|
|
94 |
return authUserId;
|
|
|
95 |
}
|
|
|
96 |
|
|
|
97 |
public void setAuthUserId(int authUserId) {
|
|
|
98 |
this.authUserId = authUserId;
|
|
|
99 |
}
|
|
|
100 |
|
|
|
101 |
public LocalDate getDeferredDate() {
|
|
|
102 |
return deferredDate;
|
|
|
103 |
}
|
|
|
104 |
|
|
|
105 |
public void setDeferredDate(LocalDate deferredDate) {
|
|
|
106 |
this.deferredDate = deferredDate;
|
|
|
107 |
}
|
|
|
108 |
|
|
|
109 |
public String getReason() {
|
|
|
110 |
return reason;
|
|
|
111 |
}
|
|
|
112 |
|
|
|
113 |
public void setReason(String reason) {
|
|
|
114 |
this.reason = reason;
|
|
|
115 |
}
|
|
|
116 |
|
| 36762 |
vikas |
117 |
public String getStatus() {
|
| 36739 |
ranu |
118 |
return status;
|
|
|
119 |
}
|
|
|
120 |
|
| 36762 |
vikas |
121 |
public void setStatus(String status) {
|
| 36739 |
ranu |
122 |
this.status = status;
|
|
|
123 |
}
|
|
|
124 |
|
|
|
125 |
public LocalDate getRescheduledToDate() {
|
|
|
126 |
return rescheduledToDate;
|
|
|
127 |
}
|
|
|
128 |
|
|
|
129 |
public void setRescheduledToDate(LocalDate rescheduledToDate) {
|
|
|
130 |
this.rescheduledToDate = rescheduledToDate;
|
|
|
131 |
}
|
|
|
132 |
|
|
|
133 |
public String getTaskType() {
|
|
|
134 |
return taskType;
|
|
|
135 |
}
|
|
|
136 |
|
|
|
137 |
public void setTaskType(String taskType) {
|
|
|
138 |
this.taskType = taskType;
|
|
|
139 |
}
|
|
|
140 |
|
|
|
141 |
public String getDisplayName() {
|
|
|
142 |
return displayName;
|
|
|
143 |
}
|
|
|
144 |
|
|
|
145 |
public void setDisplayName(String displayName) {
|
|
|
146 |
this.displayName = displayName;
|
|
|
147 |
}
|
|
|
148 |
|
|
|
149 |
public Integer getActionBy() {
|
|
|
150 |
return actionBy;
|
|
|
151 |
}
|
|
|
152 |
|
|
|
153 |
public void setActionBy(Integer actionBy) {
|
|
|
154 |
this.actionBy = actionBy;
|
|
|
155 |
}
|
|
|
156 |
|
|
|
157 |
public LocalDateTime getCreatedTimestamp() {
|
|
|
158 |
return createdTimestamp;
|
|
|
159 |
}
|
|
|
160 |
|
|
|
161 |
public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
|
|
|
162 |
this.createdTimestamp = createdTimestamp;
|
|
|
163 |
}
|
|
|
164 |
|
|
|
165 |
public LocalDateTime getUpdatedTimestamp() {
|
|
|
166 |
return updatedTimestamp;
|
|
|
167 |
}
|
|
|
168 |
|
|
|
169 |
public void setUpdatedTimestamp(LocalDateTime updatedTimestamp) {
|
|
|
170 |
this.updatedTimestamp = updatedTimestamp;
|
|
|
171 |
}
|
|
|
172 |
}
|