aboutsummaryrefslogtreecommitdiff
path: root/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Position.kt
diff options
context:
space:
mode:
authorIsidro Henoch <imhenoch@protonmail.com>2021-12-08 04:28:51 -0600
committerIsidro Henoch <imhenoch@protonmail.com>2021-12-08 04:28:51 -0600
commit04c2889895483f5925c90ed7a856d38391fcab45 (patch)
tree896334a1d8a0540b9d54c7390db2d78e61cadb1b /shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Position.kt
parentd2ee6a21355c390a4aaefc6ea847060c8e47c6ae (diff)
downloadetbsa-trackermap-mobile-04c2889895483f5925c90ed7a856d38391fcab45.tar.gz
etbsa-trackermap-mobile-04c2889895483f5925c90ed7a856d38391fcab45.tar.bz2
etbsa-trackermap-mobile-04c2889895483f5925c90ed7a856d38391fcab45.zip
WIP: Implements the basic structure for the units list/map
- Updates the Devices and Positions APIs to properly construct the Url's query when there are null values - Adds a units controller to the shared module - Adds a devices and map fragment that each print the fetched units on the console - Adds a units view model to connect previously mentioned fragments with the units controller
Diffstat (limited to 'shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Position.kt')
-rw-r--r--shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Position.kt24
1 files changed, 13 insertions, 11 deletions
diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Position.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Position.kt
index 0ce4ed2..d765825 100644
--- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Position.kt
+++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Position.kt
@@ -11,6 +11,9 @@
*/
package mx.trackermap.TrackerMap.client.models
+import kotlinx.datetime.LocalDateTime
+import kotlinx.serialization.Serializable
+
/**
*
@@ -32,28 +35,27 @@ package mx.trackermap.TrackerMap.client.models
* @param network
* @param attributes
*/
+@Serializable
data class Position (
val id: kotlin.Int? = null,
val deviceId: kotlin.Int? = null,
val protocol: kotlin.String? = null,
/* in IS0 8601 format. eg. `1963-11-22T18:30:00Z` */
- val deviceTime: java.time.LocalDateTime? = null,
+// val deviceTime: LocalDateTime? = null,
/* in IS0 8601 format. eg. `1963-11-22T18:30:00Z` */
- val fixTime: java.time.LocalDateTime? = null,
+// val fixTime: LocalDateTime? = null,
/* in IS0 8601 format. eg. `1963-11-22T18:30:00Z` */
- val serverTime: java.time.LocalDateTime? = null,
+// val serverTime: LocalDateTime? = null,
val outdated: kotlin.Boolean? = null,
val valid: kotlin.Boolean? = null,
- val latitude: java.math.BigDecimal? = null,
- val longitude: java.math.BigDecimal? = null,
- val altitude: java.math.BigDecimal? = null,
+ val latitude: Double? = null,
+ val longitude: Double? = null,
+ val altitude: Double? = null,
/* in knots */
- val speed: java.math.BigDecimal? = null,
- val course: java.math.BigDecimal? = null,
+ val speed: Double? = null,
+ val course: Double? = null,
val address: kotlin.String? = null,
- val accuracy: java.math.BigDecimal? = null,
- val network: kotlin.Any? = null,
- val attributes: kotlin.Any? = null
+ val accuracy: Double? = null
) {
} \ No newline at end of file