Subversion Repositories SmartDukaan

Rev

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

package com.spice.profitmandi.dao.entity.auth;

import javax.persistence.*;
import java.time.LocalDate;
import java.time.LocalTime;
import java.time.LocalDateTime;

import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;

@Entity
@Table(name = "auth.location_tracking")
public class LocationTracking {

    @Id
    @Column(name = "id", columnDefinition = "int(11)")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;

    @Column(name = "user_id", nullable = false)
    private int userId;

    @Column(name = "device_id", nullable = false)
    private String deviceId;

    @Column(name = "task_id", nullable = false)
    private int taskId;

    @Column(name = "lat_lng", nullable = false, length = 191)
    private String latLng;

    @Column(name = "task_date", nullable = false)
    private LocalDate taskDate;

    @Column(name = "task_name", nullable = false, length = 191)
    private String taskName;

    @Column(name = "mark_type", nullable = false, length = 191)
    private String markType;

    @Column(name = "check_in_time", nullable = true, length = 20)
    private LocalTime checkInTime;

    @Column(name = "check_out_time", nullable = true, length = 20)
    private LocalTime checkOutTime;

    @Column(name = "transit_time", nullable = true, length = 20)
    private LocalTime transitTime;

    @Column(name = "time_spent", nullable = true, length = 20)
    private LocalTime timeSpent;

    @Column(name = "task_type", nullable = false, length = 191)
    private String taskType;

    @Column(name = "task_time")
    private LocalTime taskTime;

    @Column(name = "task_description", columnDefinition = "TEXT")
    private String taskDescription;

    @Column(name = "address", nullable = false, length = 500)
    private String address;

    @Column(name = "attachment", length = 191)
    private String attachment;

    @Column(name = "total_distance", precision = 10, scale = 2)
    private String totalDistance;

    @Column(name = "estimated_time", precision = 10, scale = 2)
    private LocalTime estimatedTime;

    @Column(name = "assigned_by", nullable = false)
    private int assignedBy;

    @Column(name = "status", nullable = false)
    private boolean status;

    @Convert(converter = LocalDateTimeAttributeConverter.class)
    @Column(name = "created_timestamp", nullable = false, updatable = false)
    private LocalDateTime createdTimestamp;

    @Convert(converter = LocalDateTimeAttributeConverter.class)
    @Column(name = "updated_timestamp")
    private LocalDateTime updatedTimestamp;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public int getTaskId() {
        return taskId;
    }

    public void setTaskId(int taskId) {
        this.taskId = taskId;
    }

    public String getLatLng() {
        return latLng;
    }

    public void setLatLng(String latLng) {
        this.latLng = latLng;
    }

    public LocalDate getTaskDate() {
        return taskDate;
    }

    public void setTaskDate(LocalDate taskDate) {
        this.taskDate = taskDate;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getTaskType() {
        return taskType;
    }

    public void setTaskType(String taskType) {
        this.taskType = taskType;
    }

    public LocalTime getCheckInTime() {
        return checkInTime;
    }

    public void setCheckInTime(LocalTime checkInTime) {
        this.checkInTime = checkInTime;
    }

    public LocalTime getCheckOutTime() {
        return checkOutTime;
    }

    public void setCheckOutTime(LocalTime checkOutTime) {
        this.checkOutTime = checkOutTime;
    }

    public LocalTime getTransitTime() {
        return transitTime;
    }

    public void setTransitTime(LocalTime transitTime) {
        this.transitTime = transitTime;
    }

    public LocalTime getTimeSpent() {
        return timeSpent;
    }

    public void setTimeSpent(LocalTime timeSpent) {
        this.timeSpent = timeSpent;
    }

    public boolean isStatus() {
        return status;
    }

    public LocalTime getTaskTime() {
        return taskTime;
    }

    public void setTaskTime(LocalTime taskTime) {
        this.taskTime = taskTime;
    }

    public String getTaskDescription() {
        return taskDescription;
    }

    public void setTaskDescription(String taskDescription) {
        this.taskDescription = taskDescription;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getAttachment() {
        return attachment;
    }

    public void setAttachment(String attachment) {
        this.attachment = attachment;
    }

    public String getTotalDistance() {
        return totalDistance;
    }

    public void setTotalDistance(String totalDistance) {
        this.totalDistance = totalDistance;
    }

    public String getMarkType() {
        return markType;
    }

    public void setMarkType(String markType) {
        this.markType = markType;
    }

    public LocalTime getEstimatedTime() {
        return estimatedTime;
    }

    public void setEstimatedTime(LocalTime estimatedTime) {
        this.estimatedTime = estimatedTime;
    }

    public int getAssignedBy() {
        return assignedBy;
    }

    public void setAssignedBy(int assignedBy) {
        this.assignedBy = assignedBy;
    }

    public boolean getStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    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;
    }

    @Override
    public String toString() {
        return "LocationTracking{" +
                "id=" + id +
                ", userId=" + userId +
                ", deviceId='" + deviceId + '\'' +
                ", latLng='" + latLng + '\'' +
                ", taskDate=" + taskDate +
                ", taskName='" + taskName + '\'' +
                ", checkInTime='" + checkInTime + '\'' +
                ", checkOutTime='" + checkOutTime + '\'' +
                ", transitTime='" + transitTime + '\'' +
                ", timeSpent='" + timeSpent + '\'' +
                ", taskType='" + taskType + '\'' +
                ", taskTime=" + taskTime +
                ", taskDescription='" + taskDescription + '\'' +
                ", address='" + address + '\'' +
                ", attachment='" + attachment + '\'' +
                ", totalDistance=" + totalDistance +
                ", assignedBy=" + assignedBy +
                ", status=" + status +
                ", createdTimestamp=" + createdTimestamp +
                ", updatedTimestamp=" + updatedTimestamp +
                '}';
    }
}