Rev 36758 | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.entity.user;import javax.persistence.*;import java.time.LocalDate;import java.time.LocalDateTime;/*** Lifecycle record for a deferred beat item — a partner VISIT or a LEAD that* wasn't done on its planned day. Whether the field user deferred it or it was* auto-deferred, it lands here the same way (no source distinction). Kept* separate from auth.location_tracking (the raw event log) so the deferral can* be reviewed / rescheduled / cancelled with an audit trail. The beat plan* (beat/beat_route/beat_schedule) is never mutated.** status: DEFERRED | RESCHEDULED | CANCELLED* taskType: franchisee-visit | lead* task_id (fofoId) is the location_tracking task id (store id for visits, lead id for leads)* displayName: readable name captured at sync time (so leads & visits both render without re-resolving)*/@Entity@Table(name = "user.beat_deferred_visit")public class BeatDeferredVisit {@Id@Column(name = "id", unique = true, updatable = false)@GeneratedValue(strategy = GenerationType.IDENTITY)private int id;// 0 when not tied to a specific beat (kept non-null so it participates in the// (beat_id, fofo_id, auth_user_id, deferred_date) unique key)@Column(name = "beat_id")private int beatId;@Column(name = "fofo_id")private int fofoId;@Column(name = "auth_user_id")private int authUserId;@Column(name = "deferred_date")private LocalDate deferredDate;@Column(name = "task_type")private String taskType;@Column(name = "display_name")private String displayName;@Column(name = "reason")private String reason;@Column(name = "status")private String status;@Column(name = "rescheduled_to_date")private LocalDate rescheduledToDate;@Column(name = "action_by")private Integer actionBy;@Column(name = "created_timestamp")private LocalDateTime createdTimestamp;@Column(name = "updated_timestamp")private LocalDateTime updatedTimestamp;public int getId() {return id;}public void setId(int id) {this.id = id;}public int getBeatId() {return beatId;}public void setBeatId(int beatId) {this.beatId = beatId;}public int getFofoId() {return fofoId;}public void setFofoId(int fofoId) {this.fofoId = fofoId;}public int getAuthUserId() {return authUserId;}public void setAuthUserId(int authUserId) {this.authUserId = authUserId;}public LocalDate getDeferredDate() {return deferredDate;}public void setDeferredDate(LocalDate deferredDate) {this.deferredDate = deferredDate;}public String getReason() {return reason;}public void setReason(String reason) {this.reason = reason;}public String getStatus() {return status;}public void setStatus(String status) {this.status = status;}public LocalDate getRescheduledToDate() {return rescheduledToDate;}public void setRescheduledToDate(LocalDate rescheduledToDate) {this.rescheduledToDate = rescheduledToDate;}public String getTaskType() {return taskType;}public void setTaskType(String taskType) {this.taskType = taskType;}public String getDisplayName() {return displayName;}public void setDisplayName(String displayName) {this.displayName = displayName;}public Integer getActionBy() {return actionBy;}public void setActionBy(Integer actionBy) {this.actionBy = actionBy;}public LocalDateTime getCreatedTimestamp() {return createdTimestamp;}public void setCreatedTimestamp(LocalDateTime createdTimestamp) {this.createdTimestamp = createdTimestamp;}public LocalDateTime getUpdatedTimestamp() {return updatedTimestamp;}public void setUpdatedTimestamp(LocalDateTime updatedTimestamp) {this.updatedTimestamp = updatedTimestamp;}}