cleanup and filter support
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 39s
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 39s
This commit is contained in:
parent
6773e6ae30
commit
3f68335eb4
62 changed files with 2364 additions and 1901 deletions
|
|
@ -1,3 +1,5 @@
|
|||
use std::cmp::Ordering;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(sqlx::Type, Serialize, Deserialize, PartialEq, Debug, Clone)]
|
||||
|
|
@ -7,7 +9,7 @@ pub enum RouteType {
|
|||
SubwayElevated,
|
||||
RegionalRail,
|
||||
Bus,
|
||||
TracklessTrolley
|
||||
TracklessTrolley,
|
||||
}
|
||||
|
||||
#[derive(::sqlx::FromRow, Serialize, Deserialize, Debug, Clone)]
|
||||
|
|
@ -16,13 +18,33 @@ pub struct Route {
|
|||
pub short_name: String,
|
||||
pub color_hex: String,
|
||||
pub route_type: RouteType,
|
||||
pub id: String
|
||||
pub id: String,
|
||||
pub directions: Vec<crate::direction::Direction>,
|
||||
}
|
||||
|
||||
impl PartialEq for Route {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.id == other.id
|
||||
}
|
||||
}
|
||||
|
||||
impl Eq for Route {}
|
||||
|
||||
impl Ord for Route {
|
||||
fn cmp(&self, other: &Self) -> Ordering {
|
||||
self.id.cmp(&other.id)
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialOrd for Route {
|
||||
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
||||
Some(self.id.cmp(&other.id))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(::sqlx::FromRow, Serialize, Deserialize, Debug, Clone)]
|
||||
pub struct InterlinedRoute {
|
||||
pub interline_id: String,
|
||||
pub interline_name: String,
|
||||
pub interlined_routes: Vec<String>
|
||||
pub interlined_routes: Vec<String>,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue