WaypointEntity

data class WaypointEntity(val waypointId: Double = 0.0, val latitude: Double, val longitude: Double, val elevation: Double?, val time: String?, val trackOwnerId: Int)

Room database entity representing a Waypoint.

This is the persistence-layer model stored in the local DB. It maps directly to the "waypoints" table and has a foreign key relationship to the TrackEntity.

Constructors

Link copied to clipboard
constructor(waypointId: Double = 0.0, latitude: Double, longitude: Double, elevation: Double?, time: String?, trackOwnerId: Int)

Properties

Link copied to clipboard

Optional elevation in meters.

Link copied to clipboard

Latitude of the waypoint.

Link copied to clipboard

Longitude of the waypoint.

Link copied to clipboard
val time: String?
Link copied to clipboard

Foreign key pointing to the parent TrackEntity.

Link copied to clipboard
val waypointId: Double = 0.0

Unique ID for the waypoint. - Using Double here is unusual; typically Int or Long is used. - If this represents a sequence/index, consider making it a composite key with trackOwnerId.

Functions

Link copied to clipboard

Converts a database WaypointEntity into a domain Waypoint object.