Subversion Repositories SmartDukaan

Rev

Rev 34678 | Rev 34694 | 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
 
69
    @Column(name = "assigned_by", nullable = false)
70
    private int assignedBy;
71
 
72
    @Column(name = "status", nullable = false)
73
    private boolean status;
74
 
75
    @Convert(converter = LocalDateTimeAttributeConverter.class)
76
    @Column(name = "created_timestamp", nullable = false, updatable = false)
77
    private LocalDateTime createdTimestamp;
78
 
79
    @Convert(converter = LocalDateTimeAttributeConverter.class)
80
    @Column(name = "updated_timestamp")
81
    private LocalDateTime updatedTimestamp;
82
 
83
    public int getId() {
84
        return id;
85
    }
86
 
87
    public void setId(int id) {
88
        this.id = id;
89
    }
90
 
91
    public int getUserId() {
92
        return userId;
93
    }
94
 
95
    public void setUserId(int userId) {
96
        this.userId = userId;
97
    }
98
 
99
    public String getDeviceId() {
100
        return deviceId;
101
    }
102
 
103
    public void setDeviceId(String deviceId) {
104
        this.deviceId = deviceId;
105
    }
106
 
107
    public String getLatLng() {
108
        return latLng;
109
    }
110
 
111
    public void setLatLng(String latLng) {
112
        this.latLng = latLng;
113
    }
114
 
115
    public LocalDate getTaskDate() {
116
        return taskDate;
117
    }
118
 
119
    public void setTaskDate(LocalDate taskDate) {
120
        this.taskDate = taskDate;
121
    }
122
 
123
    public String getTaskName() {
124
        return taskName;
125
    }
126
 
127
    public void setTaskName(String taskName) {
128
        this.taskName = taskName;
129
    }
130
 
131
    public String getTaskType() {
132
        return taskType;
133
    }
134
 
135
    public void setTaskType(String taskType) {
136
        this.taskType = taskType;
137
    }
138
 
34692 vikas.jang 139
    public LocalTime getCheckInTime() {
140
        return checkInTime;
34678 vikas.jang 141
    }
142
 
34692 vikas.jang 143
    public void setCheckInTime(LocalTime checkInTime) {
144
        this.checkInTime = checkInTime;
34678 vikas.jang 145
    }
146
 
34692 vikas.jang 147
    public LocalTime getCheckOutTime() {
148
        return checkOutTime;
149
    }
150
 
151
    public void setCheckOutTime(LocalTime checkOutTime) {
152
        this.checkOutTime = checkOutTime;
153
    }
154
 
155
    public LocalTime getTransitTime() {
156
        return transitTime;
157
    }
158
 
159
    public void setTransitTime(LocalTime transitTime) {
160
        this.transitTime = transitTime;
161
    }
162
 
163
    public LocalTime getTimeSpent() {
164
        return timeSpent;
165
    }
166
 
167
    public void setTimeSpent(LocalTime timeSpent) {
168
        this.timeSpent = timeSpent;
169
    }
170
 
171
    public boolean isStatus() {
172
        return status;
173
    }
174
 
34678 vikas.jang 175
    public LocalTime getTaskTime() {
176
        return taskTime;
177
    }
178
 
179
    public void setTaskTime(LocalTime taskTime) {
180
        this.taskTime = taskTime;
181
    }
182
 
183
    public String getTaskDescription() {
184
        return taskDescription;
185
    }
186
 
187
    public void setTaskDescription(String taskDescription) {
188
        this.taskDescription = taskDescription;
189
    }
190
 
191
    public String getAddress() {
192
        return address;
193
    }
194
 
195
    public void setAddress(String address) {
196
        this.address = address;
197
    }
198
 
199
    public String getAttachment() {
200
        return attachment;
201
    }
202
 
203
    public void setAttachment(String attachment) {
204
        this.attachment = attachment;
205
    }
206
 
34692 vikas.jang 207
    public double getTotalDistance() {
34678 vikas.jang 208
        return totalDistance;
209
    }
210
 
34692 vikas.jang 211
    public void setTotalDistance(double totalDistance) {
34678 vikas.jang 212
        this.totalDistance = totalDistance;
213
    }
214
 
215
    public int getAssignedBy() {
216
        return assignedBy;
217
    }
218
 
219
    public void setAssignedBy(int assignedBy) {
220
        this.assignedBy = assignedBy;
221
    }
222
 
223
    public boolean getStatus() {
224
        return status;
225
    }
226
 
227
    public void setStatus(boolean status) {
228
        this.status = status;
229
    }
230
 
231
    public LocalDateTime getCreatedTimestamp() {
232
        return createdTimestamp;
233
    }
234
 
235
    public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
236
        this.createdTimestamp = createdTimestamp;
237
    }
238
 
239
    public LocalDateTime getUpdatedTimestamp() {
240
        return updatedTimestamp;
241
    }
242
 
243
    public void setUpdatedTimestamp(LocalDateTime updatedTimestamp) {
244
        this.updatedTimestamp = updatedTimestamp;
245
    }
246
 
247
    @Override
248
    public String toString() {
34692 vikas.jang 249
        return "LocationTracking{" +
250
                "id=" + id +
251
                ", userId=" + userId +
252
                ", deviceId='" + deviceId + '\'' +
253
                ", latLng='" + latLng + '\'' +
254
                ", taskDate=" + taskDate +
255
                ", taskName='" + taskName + '\'' +
256
                ", checkInTime='" + checkInTime + '\'' +
257
                ", checkOutTime='" + checkOutTime + '\'' +
258
                ", transitTime='" + transitTime + '\'' +
259
                ", timeSpent='" + timeSpent + '\'' +
260
                ", taskType='" + taskType + '\'' +
261
                ", taskTime=" + taskTime +
262
                ", taskDescription='" + taskDescription + '\'' +
263
                ", address='" + address + '\'' +
264
                ", attachment='" + attachment + '\'' +
265
                ", totalDistance=" + totalDistance +
266
                ", assignedBy=" + assignedBy +
267
                ", status=" + status +
268
                ", createdTimestamp=" + createdTimestamp +
269
                ", updatedTimestamp=" + updatedTimestamp +
270
                '}';
34678 vikas.jang 271
    }
272
}