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
|
|
@ -2,8 +2,7 @@ use std::collections::HashMap;
|
|||
use libseptastic::{direction::CardinalDirection, route::RouteType};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use sqlx::{Postgres, Transaction};
|
||||
|
||||
use crate::services::trip_tracking::TripTracking;
|
||||
use libseptastic::{stop_schedule::{Trip, TripTracking, StopSchedule}};
|
||||
|
||||
pub async fn get_route_by_id(
|
||||
id: String,
|
||||
|
|
@ -104,29 +103,6 @@ pub async fn get_direction_by_route_id(
|
|||
return Ok(res);
|
||||
}
|
||||
|
||||
#[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
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Trip {
|
||||
pub route_id: String,
|
||||
pub trip_id: String,
|
||||
pub direction_id: i64,
|
||||
pub tracking_data: TripTracking,
|
||||
pub schedule: Vec<StopSchedule>
|
||||
}
|
||||
|
||||
|
||||
pub async fn get_schedule_by_route_id(
|
||||
id: String,
|
||||
transaction: &mut Transaction<'_, Postgres>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue