Route

data class Route(val routeUid: String, val routeName: String, val isOptimized: Boolean = false, val transportMode: RouteTransportMode? = null, val routeColor: String? = null, val departureDateTime: String? = null, val isRecurring: Boolean = false, val recurrencePattern: RouteRecurrencePattern? = null, val totalDistance: Int = 0, val totalTime: Int = 0, val totalJobs: Int = 0, val routeStatus: RouteStatus = RouteStatus.PLANNED, val createdByUid: String? = null, val createdBy: User? = null, val startLocation: RouteLocation? = null, val endLocation: RouteLocation? = null, val polylineCoordinates: List<RoutePolylinePoint> = emptyList(), val routeConfig: RouteConfiguration? = null, val optimizationSettings: RouteOptimizationSettings? = null, val assignments: List<RouteAssignment> = emptyList(), val statusHistory: List<RouteStatusHistory> = emptyList(), val routeJobs: List<RouteJob> = emptyList(), val optimizations: List<RouteOptimization> = emptyList(), val attachments: List<String> = emptyList(), val createdAt: String, val updatedAt: String? = null, val syncedAt: String? = null, val cacheExpiresAt: String? = null, val isFromArchive: Boolean = false)

Domain model representing a Route in the Zuper system.

Routes are comprehensive navigation containers that organize jobs, stops, and optimize field service technician movements for efficient service delivery.

Constructors

Link copied to clipboard
constructor(routeUid: String, routeName: String, isOptimized: Boolean = false, transportMode: RouteTransportMode? = null, routeColor: String? = null, departureDateTime: String? = null, isRecurring: Boolean = false, recurrencePattern: RouteRecurrencePattern? = null, totalDistance: Int = 0, totalTime: Int = 0, totalJobs: Int = 0, routeStatus: RouteStatus = RouteStatus.PLANNED, createdByUid: String? = null, createdBy: User? = null, startLocation: RouteLocation? = null, endLocation: RouteLocation? = null, polylineCoordinates: List<RoutePolylinePoint> = emptyList(), routeConfig: RouteConfiguration? = null, optimizationSettings: RouteOptimizationSettings? = null, assignments: List<RouteAssignment> = emptyList(), statusHistory: List<RouteStatusHistory> = emptyList(), routeJobs: List<RouteJob> = emptyList(), optimizations: List<RouteOptimization> = emptyList(), attachments: List<String> = emptyList(), createdAt: String, updatedAt: String? = null, syncedAt: String? = null, cacheExpiresAt: String? = null, isFromArchive: Boolean = false)

Properties

Link copied to clipboard

Get actual duration (for completed routes).

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val cacheExpiresAt: String? = null
Link copied to clipboard

Get route completion percentage.

Link copied to clipboard
Link copied to clipboard
val createdBy: User? = null
Link copied to clipboard
val createdByUid: String? = null
Link copied to clipboard

Get current assignees (users and teams).

Link copied to clipboard

Get current stop (in progress).

Link copied to clipboard
Link copied to clipboard

Get route display name with fallback.

Link copied to clipboard

Get primary driver assignment.

Link copied to clipboard

Get route efficiency metrics.

Link copied to clipboard
Link copied to clipboard

Get route duration estimation.

Link copied to clipboard

Get formatted total distance.

Link copied to clipboard

Get formatted total time.

Link copied to clipboard

Check if route has GPS tracking data.

Link copied to clipboard

Check if route is cancelled.

Link copied to clipboard

Check if route is completed.

Link copied to clipboard
val isFromArchive: Boolean = false
Link copied to clipboard

Check if route is in progress.

Link copied to clipboard
val isOptimized: Boolean = false
Link copied to clipboard
val isRecurring: Boolean = false
Link copied to clipboard

Get latest optimization.

Link copied to clipboard

Get latest status change.

Link copied to clipboard

Check if route needs optimization.

Link copied to clipboard

Get next pending stop.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val routeColor: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Get route status color for UI display.

Link copied to clipboard
Link copied to clipboard
val syncedAt: String? = null
Link copied to clipboard
Link copied to clipboard
val totalJobs: Int = 0
Link copied to clipboard
val totalTime: Int = 0
Link copied to clipboard
Link copied to clipboard

Get transport mode display name.

Link copied to clipboard
val updatedAt: String? = null

Functions

Link copied to clipboard

Check if route is assigned to a specific team.

Link copied to clipboard

Check if route is assigned to a specific user.