Subversion Repositories SmartDukaan

Rev

Rev 36711 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
36644 ranu 1
package com.spice.profitmandi.dao.entity.user;
2
 
36811 ranu 3
import com.spice.profitmandi.dao.enumuration.dtr.BeatVisitType;
4
 
36644 ranu 5
import javax.persistence.*;
6
 
7
@Entity
8
@Table(name = "user.beat_route")
9
public class BeatRoute {
10
 
11
    @Id
12
    @Column(name = "id", unique = true, updatable = false)
13
    @GeneratedValue(strategy = GenerationType.IDENTITY)
14
    private int id;
15
 
16
    @Column(name = "beat_id")
17
    private int beatId;
18
 
36811 ranu 19
    // Polymorphic FK — meaning depends on visitType:
20
    //   PARTNER → fofo_store.id
21
    //   OFFICE  → logistics.company_office.id
36644 ranu 22
    @Column(name = "fofo_id")
23
    private int fofoId;
24
 
36811 ranu 25
    @Column(name = "visit_type")
26
    @Enumerated(EnumType.STRING)
27
    private BeatVisitType visitType;
28
 
36644 ranu 29
    @Column(name = "sequence_order")
30
    private int sequenceOrder;
31
 
32
    @Column(name = "day_number")
33
    private int dayNumber;
34
 
35
    @Column(name = "active")
36
    private boolean active;
37
 
36711 ranu 38
    // Distance/time from the PREVIOUS stop on this day's route.
39
    // For the first stop of a day this is from the day's start (home/stay).
40
    // Nullable so legacy rows created before this column existed stay valid.
41
    @Column(name = "distance_from_prev_km")
42
    private Double distanceFromPrevKm;
43
 
44
    @Column(name = "time_from_prev_mins")
45
    private Integer timeFromPrevMins;
46
 
36644 ranu 47
    public int getId() {
48
        return id;
49
    }
50
 
51
    public void setId(int id) {
52
        this.id = id;
53
    }
54
 
55
    public int getBeatId() {
56
        return beatId;
57
    }
58
 
59
    public void setBeatId(int beatId) {
60
        this.beatId = beatId;
61
    }
62
 
63
    public int getFofoId() {
64
        return fofoId;
65
    }
66
 
67
    public void setFofoId(int fofoId) {
68
        this.fofoId = fofoId;
69
    }
70
 
36811 ranu 71
    public BeatVisitType getVisitType() {
72
        return visitType;
73
    }
74
 
75
    public void setVisitType(BeatVisitType visitType) {
76
        this.visitType = visitType;
77
    }
78
 
36644 ranu 79
    public int getSequenceOrder() {
80
        return sequenceOrder;
81
    }
82
 
83
    public void setSequenceOrder(int sequenceOrder) {
84
        this.sequenceOrder = sequenceOrder;
85
    }
86
 
87
    public int getDayNumber() {
88
        return dayNumber;
89
    }
90
 
91
    public void setDayNumber(int dayNumber) {
92
        this.dayNumber = dayNumber;
93
    }
94
 
95
    public boolean isActive() {
96
        return active;
97
    }
98
 
99
    public void setActive(boolean active) {
100
        this.active = active;
101
    }
36711 ranu 102
 
103
    public Double getDistanceFromPrevKm() {
104
        return distanceFromPrevKm;
105
    }
106
 
107
    public void setDistanceFromPrevKm(Double distanceFromPrevKm) {
108
        this.distanceFromPrevKm = distanceFromPrevKm;
109
    }
110
 
111
    public Integer getTimeFromPrevMins() {
112
        return timeFromPrevMins;
113
    }
114
 
115
    public void setTimeFromPrevMins(Integer timeFromPrevMins) {
116
        this.timeFromPrevMins = timeFromPrevMins;
117
    }
36644 ranu 118
}