From 8611df1c75187bb1d357f3fbf07f296cfd580ce5 Mon Sep 17 00:00:00 2001 From: fiatcode Date: Thu, 30 Apr 2026 10:53:55 +0700 Subject: [PATCH] feat: add Location and EventLogEntry data models --- .../traccar_client/model/EventLogEntry.kt | 17 +++++++++++++++++ .../traccar/traccar_client/model/Location.kt | 14 ++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 android/app/src/main/kotlin/com/traccar/traccar_client/model/EventLogEntry.kt create mode 100644 android/app/src/main/kotlin/com/traccar/traccar_client/model/Location.kt diff --git a/android/app/src/main/kotlin/com/traccar/traccar_client/model/EventLogEntry.kt b/android/app/src/main/kotlin/com/traccar/traccar_client/model/EventLogEntry.kt new file mode 100644 index 0000000..3b68c3e --- /dev/null +++ b/android/app/src/main/kotlin/com/traccar/traccar_client/model/EventLogEntry.kt @@ -0,0 +1,17 @@ +package com.traccar.traccar_client.model + +data class EventLogEntry( + val id: Long = 0, + val timestamp: Long, + val eventType: String, + val message: String +) + +enum class EventType { + LOCATION, + FILTERED, + SYNC, + HEARTBEAT, + NETWORK_CHANGE, + ERROR +} \ No newline at end of file diff --git a/android/app/src/main/kotlin/com/traccar/traccar_client/model/Location.kt b/android/app/src/main/kotlin/com/traccar/traccar_client/model/Location.kt new file mode 100644 index 0000000..e639da6 --- /dev/null +++ b/android/app/src/main/kotlin/com/traccar/traccar_client/model/Location.kt @@ -0,0 +1,14 @@ +package com.traccar.traccar_client.model + +data class Location( + val id: Long = 0, + val timestamp: Long, + val latitude: Double, + val longitude: Double, + val accuracy: Float?, + val speed: Float?, + val heading: Float?, + val altitude: Double?, + val isMoving: Boolean, + val synced: Boolean = false +) \ No newline at end of file