merge w/ gtfs
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Has been cancelled
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Has been cancelled
This commit is contained in:
commit
786f32e7e3
39 changed files with 1220 additions and 1515 deletions
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(sqlx::Type, Serialize, Deserialize, PartialEq, Debug, Clone)]
|
||||
#[derive(sqlx::Type, Serialize, Deserialize, PartialEq, Debug, Clone, Copy, Eq)]
|
||||
#[sqlx(type_name = "septa_direction_type", rename_all = "snake_case")]
|
||||
pub enum CardinalDirection {
|
||||
Northbound,
|
||||
|
|
@ -15,8 +15,6 @@ pub enum CardinalDirection {
|
|||
|
||||
#[derive(::sqlx::Decode, Serialize, Deserialize, Debug, Clone)]
|
||||
pub struct Direction {
|
||||
pub route_id: String,
|
||||
pub direction_id: i64,
|
||||
pub direction: CardinalDirection,
|
||||
pub direction_destination: String
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
pub mod route;
|
||||
pub mod agency;
|
||||
pub mod stop;
|
||||
pub mod route_stop;
|
||||
pub mod stop_schedule;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
#[derive(sqlx::Type, PartialEq, Debug, Clone)]
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(sqlx::Type, PartialEq, Debug, Clone, Serialize, Deserialize)]
|
||||
#[sqlx(type_name = "septa_stop_type", rename_all = "snake_case")]
|
||||
pub enum StopType {
|
||||
FarSide,
|
||||
|
|
@ -6,7 +8,7 @@ pub enum StopType {
|
|||
Normal
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Stop {
|
||||
pub id: i64,
|
||||
pub name: String,
|
||||
|
|
|
|||
|
|
@ -1,22 +1,19 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::direction::Direction;
|
||||
|
||||
#[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,
|
||||
pub arrival_time: i64,
|
||||
pub stop_id: i64,
|
||||
pub stop_sequence: i64
|
||||
pub stop_sequence: i64,
|
||||
pub stop: crate::stop::Stop
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Trip {
|
||||
pub route_id: String,
|
||||
pub service_id: String,
|
||||
pub trip_id: String,
|
||||
pub direction_id: i64,
|
||||
pub direction: Direction,
|
||||
pub tracking_data: TripTracking,
|
||||
pub schedule: Vec<StopSchedule>
|
||||
}
|
||||
|
|
@ -33,5 +30,5 @@ pub struct LiveTrip {
|
|||
pub delay: f64,
|
||||
pub next_stop_id: Option<i64>,
|
||||
pub timestamp: i64,
|
||||
pub vehicle_id: Option<String>
|
||||
pub vehicle_ids: Vec<String>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue