Subversion Repositories SmartDukaan

Rev

Rev 34692 | Rev 34723 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
34678 vikas.jang 1
package com.spice.profitmandi.dao.entity.auth;
2
 
3
import javax.persistence.*;
4
import java.math.BigDecimal;
5
import java.time.LocalDate;
6
import java.time.LocalTime;
7
import java.time.LocalDateTime;
8
 
34692 vikas.jang 9
import com.spice.profitmandi.common.model.ProfitMandiConstants;
34678 vikas.jang 10
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
11
 
12
@Entity
13
@Table(name = "auth.location_tracking")
14
public class LocationTracking {
15
 
16
    @Id
17
    @GeneratedValue(strategy = GenerationType.IDENTITY)
18
    @Column(name = "id", unique = true, updatable = false)
19
    private int id;
20
 
21
    @Column(name = "user_id", nullable = false)
22
    private int userId;
23
 
24
    @Column(name = "device_id", nullable = false)
25
    private String deviceId;
26
 
27
    @Column(name = "lat_lng", nullable = false, length = 191)
28
    private String latLng;
29
 
30
    @Column(name = "task_date", nullable = false)
31
    private LocalDate taskDate;
32
 
33
    @Column(name = "task_name", nullable = false, length = 191)
34
    private String taskName;
35
 
34692 vikas.jang 36
    @Column(name = "mark_type", nullable = false, length = 191)
37
    private ProfitMandiConstants.MARK_TYPE markType;
34678 vikas.jang 38
 
34692 vikas.jang 39
    @Column(name = "check_in_time", nullable = true, length = 20)
40
    private LocalTime checkInTime;
41
 
42
    @Column(name = "check_out_time", nullable = true, length = 20)
43
    private LocalTime checkOutTime;
44
 
45
    @Column(name = "transit_time", nullable = true, length = 20)
46
    private LocalTime transitTime;
47
 
48
    @Column(name = "time_spent", nullable = true, length = 20)
49
    private LocalTime timeSpent;
50
 
34678 vikas.jang 51
    @Column(name = "task_type", nullable = false, length = 191)
52
    private String taskType;
53
 
54
    @Column(name = "task_time")
55
    private LocalTime taskTime;
56
 
57
    @Column(name = "task_description", columnDefinition = "TEXT")
58
    private String taskDescription;
59
 
60
    @Column(name = "address", nullable = false, length = 500)
61
    private String address;
62
 
63
    @Column(name = "attachment", length = 191)
64
    private String attachment;
65
 
66
    @Column(name = "total_distance", precision = 10, scale = 2)
34692 vikas.jang 67
    private double totalDistance;
34678 vikas.jang 68
 
34694 vikas.jang 69
    @Column(name = "estimated_time", precision = 10, scale = 2)
70
    private double estimatedTime;
71
 
34678 vikas.jang 72
    @Column(name = "assigned_by", nullable = false)
73
    private int assignedBy;
74
 
75
    @Column(name = "status", nullable = false)
76
    private boolean status;
77
 
78
    @Convert(converter = LocalDateTimeAttributeConverter.class)
79
    @Column(name = "created_timestamp", nullable = false, updatable = false)
80
    private LocalDateTime createdTimestamp;
81
 
82
    @Convert(converter = LocalDateTimeAttributeConverter.class)
83
    @Column(name = "updated_timestamp")
84
    private LocalDateTime updatedTimestamp;
85
 
86
    public int getId() {
87
        return id;
88
    }
89
 
90
    public void setId(int id) {
91
        this.id = id;
92
    }
93
 
94
    public int getUserId() {
95
        return userId;
96
    }
97
 
98
    public void setUserId(int userId) {
99
        this.userId = userId;
100
    }
101
 
102
    public String getDeviceId() {
103
        return deviceId;
104
    }
105
 
106
    public void setDeviceId(String deviceId) {
107
        this.deviceId = deviceId;
108
    }
109
 
110
    public String getLatLng() {
111
        return latLng;
112
    }
113
 
114
    public void setLatLng(String latLng) {
115
        this.latLng = latLng;
116
    }
117
 
118
    public LocalDate getTaskDate() {
119
        return taskDate;
120
    }
121
 
122
    public void setTaskDate(LocalDate taskDate) {
123
        this.taskDate = taskDate;
124
    }
125
 
126
    public String getTaskName() {
127
        return taskName;
128
    }
129
 
130
    public void setTaskName(String taskName) {
131
        this.taskName = taskName;
132
    }
133
 
134
    public String getTaskType() {
135
        return taskType;
136
    }
137
 
138
    public void setTaskType(String taskType) {
139
        this.taskType = taskType;
140
    }
141
 
34692 vikas.jang 142
    public LocalTime getCheckInTime() {
143
        return checkInTime;
34678 vikas.jang 144
    }
145
 
34692 vikas.jang 146
    public void setCheckInTime(LocalTime checkInTime) {
147
        this.checkInTime = checkInTime;
34678 vikas.jang 148
    }
149
 
34692 vikas.jang 150
    public LocalTime getCheckOutTime() {
151
        return checkOutTime;
152
    }
153
 
154
    public void setCheckOutTime(LocalTime checkOutTime) {
155
        this.checkOutTime = checkOutTime;
156
    }
157
 
158
    public LocalTime getTransitTime() {
159
        return transitTime;
160
    }
161
 
162
    public void setTransitTime(LocalTime transitTime) {
163
        this.transitTime = transitTime;
164
    }
165
 
166
    public LocalTime getTimeSpent() {
167
        return timeSpent;
168
    }
169
 
170
    public void setTimeSpent(LocalTime timeSpent) {
171
        this.timeSpent = timeSpent;
172
    }
173
 
174
    public boolean isStatus() {
175
        return status;
176
    }
177
 
34678 vikas.jang 178
    public LocalTime getTaskTime() {
179
        return taskTime;
180
    }
181
 
182
    public void setTaskTime(LocalTime taskTime) {
183
        this.taskTime = taskTime;
184
    }
185
 
186
    public String getTaskDescription() {
187
        return taskDescription;
188
    }
189
 
190
    public void setTaskDescription(String taskDescription) {
191
        this.taskDescription = taskDescription;
192
    }
193
 
194
    public String getAddress() {
195
        return address;
196
    }
197
 
198
    public void setAddress(String address) {
199
        this.address = address;
200
    }
201
 
202
    public String getAttachment() {
203
        return attachment;
204
    }
205
 
206
    public void setAttachment(String attachment) {
207
        this.attachment = attachment;
208
    }
209
 
34692 vikas.jang 210
    public double getTotalDistance() {
34678 vikas.jang 211
        return totalDistance;
212
    }
213
 
34692 vikas.jang 214
    public void setTotalDistance(double totalDistance) {
34678 vikas.jang 215
        this.totalDistance = totalDistance;
216
    }
217
 
34694 vikas.jang 218
    public ProfitMandiConstants.MARK_TYPE getMarkType() {
219
        return markType;
220
    }
221
 
222
    public void setMarkType(ProfitMandiConstants.MARK_TYPE markType) {
223
        this.markType = markType;
224
    }
225
 
226
    public double getEstimatedTime() {
227
        return estimatedTime;
228
    }
229
 
230
    public void setEstimatedTime(double estimatedTime) {
231
        this.estimatedTime = estimatedTime;
232
    }
233
 
34678 vikas.jang 234
    public int getAssignedBy() {
235
        return assignedBy;
236
    }
237
 
238
    public void setAssignedBy(int assignedBy) {
239
        this.assignedBy = assignedBy;
240
    }
241
 
242
    public boolean getStatus() {
243
        return status;
244
    }
245
 
246
    public void setStatus(boolean status) {
247
        this.status = status;
248
    }
249
 
250
    public LocalDateTime getCreatedTimestamp() {
251
        return createdTimestamp;
252
    }
253
 
254
    public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
255
        this.createdTimestamp = createdTimestamp;
256
    }
257
 
258
    public LocalDateTime getUpdatedTimestamp() {
259
        return updatedTimestamp;
260
    }
261
 
262
    public void setUpdatedTimestamp(LocalDateTime updatedTimestamp) {
263
        this.updatedTimestamp = updatedTimestamp;
264
    }
265
 
266
    @Override
267
    public String toString() {
34692 vikas.jang 268
        return "LocationTracking{" +
269
                "id=" + id +
270
                ", userId=" + userId +
271
                ", deviceId='" + deviceId + '\'' +
272
                ", latLng='" + latLng + '\'' +
273
                ", taskDate=" + taskDate +
274
                ", taskName='" + taskName + '\'' +
275
                ", checkInTime='" + checkInTime + '\'' +
276
                ", checkOutTime='" + checkOutTime + '\'' +
277
                ", transitTime='" + transitTime + '\'' +
278
                ", timeSpent='" + timeSpent + '\'' +
279
                ", taskType='" + taskType + '\'' +
280
                ", taskTime=" + taskTime +
281
                ", taskDescription='" + taskDescription + '\'' +
282
                ", address='" + address + '\'' +
283
                ", attachment='" + attachment + '\'' +
284
                ", totalDistance=" + totalDistance +
285
                ", assignedBy=" + assignedBy +
286
                ", status=" + status +
287
                ", createdTimestamp=" + createdTimestamp +
288
                ", updatedTimestamp=" + updatedTimestamp +
289
                '}';
34678 vikas.jang 290
    }
291
}