Subversion Repositories SmartDukaan

Rev

Rev 36758 | Go to most recent revision | Details | Last modification | View Log | RSS feed

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