diff options
author | Isidro Henoch <imhenoch@protonmail.com> | 2021-12-08 04:28:51 -0600 |
---|---|---|
committer | Isidro Henoch <imhenoch@protonmail.com> | 2021-12-08 04:28:51 -0600 |
commit | 04c2889895483f5925c90ed7a856d38391fcab45 (patch) | |
tree | 896334a1d8a0540b9d54c7390db2d78e61cadb1b /shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Device.kt | |
parent | d2ee6a21355c390a4aaefc6ea847060c8e47c6ae (diff) | |
download | etbsa-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/Device.kt')
-rw-r--r-- | shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Device.kt | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Device.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Device.kt index 3729345..f8a1642 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Device.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Device.kt @@ -11,6 +11,9 @@ */ package mx.trackermap.TrackerMap.client.models +import kotlinx.datetime.LocalDateTime +import kotlinx.serialization.Serializable + /** * @@ -29,22 +32,22 @@ package mx.trackermap.TrackerMap.client.models * @param geofenceIds * @param attributes */ +@Serializable data class Device ( - val id: kotlin.Int? = null, - val name: kotlin.String? = null, - val uniqueId: kotlin.String? = null, - val status: kotlin.String? = null, - val disabled: kotlin.Boolean? = null, + val id: Int, + val name: String, + val uniqueId: String? = null, + val status: String? = null, + val disabled: Boolean? = null, /* in IS0 8601 format. eg. `1963-11-22T18:30:00Z` */ - val lastUpdate: java.time.LocalDateTime? = null, - val positionId: kotlin.Int? = null, - val groupId: kotlin.Int? = null, - val phone: kotlin.String? = null, - val model: kotlin.String? = null, - val contact: kotlin.String? = null, - val category: kotlin.String? = null, - val geofenceIds: kotlin.Array<kotlin.Int>? = null, - val attributes: kotlin.Any? = null +// val lastUpdate: LocalDateTime? = null, + val positionId: Int? = null, + val groupId: Int? = null, + val phone: String? = null, + val model: String? = null, + val contact: String? = null, + val category: String? = null, + val geofenceIds: Array<Int>? = null ) { }
\ No newline at end of file |