clean up + update dfile
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 6m0s
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 6m0s
This commit is contained in:
parent
7904c80642
commit
8fd41b1090
8 changed files with 314 additions and 335 deletions
|
|
@ -3,6 +3,7 @@ use serde::{Deserialize, Serialize};
|
|||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct StopSchedule {
|
||||
pub route_id: String,
|
||||
pub stop_name: String,
|
||||
pub trip_id: String,
|
||||
pub service_id: String,
|
||||
pub direction_id: i64,
|
||||
|
|
@ -16,15 +17,21 @@ pub struct Trip {
|
|||
pub route_id: String,
|
||||
pub trip_id: String,
|
||||
pub direction_id: i64,
|
||||
pub live_trip_data: Option<LiveTrip>,
|
||||
pub tracking_data: TripTracking,
|
||||
pub schedule: Vec<StopSchedule>
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct LiveTrip {
|
||||
pub delay: i64,
|
||||
pub next_stop_id: i64,
|
||||
pub timestamp: i64,
|
||||
pub vehicle_id: String
|
||||
pub enum TripTracking {
|
||||
Tracked(LiveTrip),
|
||||
Untracked,
|
||||
Cancelled
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct LiveTrip {
|
||||
pub delay: f64,
|
||||
pub next_stop_id: Option<String>,
|
||||
pub timestamp: i64,
|
||||
pub vehicle_id: Option<String>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue