diff options
author | Anton Tananaev <anton@traccar.org> | 2022-09-25 10:35:20 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-09-25 10:35:20 -0700 |
commit | fe3d9995cceb2f1530a7c2549ae9a4cf457cb7f0 (patch) | |
tree | 36e7d1b457f7c1e8d3b867cd106033d000a59ddf /src/main/java/org/traccar/model | |
parent | abb26e80a5617424d960a0f7d0b98fcb379a5224 (diff) | |
download | trackermap-server-fe3d9995cceb2f1530a7c2549ae9a4cf457cb7f0.tar.gz trackermap-server-fe3d9995cceb2f1530a7c2549ae9a4cf457cb7f0.tar.bz2 trackermap-server-fe3d9995cceb2f1530a7c2549ae9a4cf457cb7f0.zip |
Persist device state
Diffstat (limited to 'src/main/java/org/traccar/model')
-rw-r--r-- | src/main/java/org/traccar/model/Device.java | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/model/Device.java b/src/main/java/org/traccar/model/Device.java index f21e5ca84..147b0fd20 100644 --- a/src/main/java/org/traccar/model/Device.java +++ b/src/main/java/org/traccar/model/Device.java @@ -19,6 +19,7 @@ import java.util.Date; import java.util.List; import java.util.stream.Collectors; +import com.fasterxml.jackson.annotation.JsonIgnore; import org.traccar.storage.QueryIgnore; import org.traccar.storage.StorageName; @@ -162,4 +163,82 @@ public class Device extends GroupedModel implements Disableable { this.expirationTime = expirationTime; } + private boolean motionState; + + @QueryIgnore + @JsonIgnore + public boolean getMotionState() { + return motionState; + } + + @JsonIgnore + public void setMotionState(boolean motionState) { + this.motionState = motionState; + } + + private Date motionTime; + + @QueryIgnore + @JsonIgnore + public Date getMotionTime() { + return motionTime; + } + + @JsonIgnore + public void setMotionTime(Date motionTime) { + this.motionTime = motionTime; + } + + private double motionDistance; + + @QueryIgnore + @JsonIgnore + public double getMotionDistance() { + return motionDistance; + } + + @JsonIgnore + public void setMotionDistance(double motionDistance) { + this.motionDistance = motionDistance; + } + + private boolean overspeedState; + + @QueryIgnore + @JsonIgnore + public boolean getOverspeedState() { + return overspeedState; + } + + @JsonIgnore + public void setOverspeedState(boolean overspeedState) { + this.overspeedState = overspeedState; + } + + private Date overspeedTime; + + @QueryIgnore + @JsonIgnore + public Date getOverspeedTime() { + return overspeedTime; + } + + @JsonIgnore + public void setOverspeedTime(Date overspeedTime) { + this.overspeedTime = overspeedTime; + } + + private long overspeedGeofenceId; + + @QueryIgnore + @JsonIgnore + public long getOverspeedGeofenceId() { + return overspeedGeofenceId; + } + + @JsonIgnore + public void setOverspeedGeofenceId(long overspeedGeofenceId) { + this.overspeedGeofenceId = overspeedGeofenceId; + } + } |