many changes
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:
parent
4777f46a38
commit
be177af6cd
25 changed files with 2059 additions and 47 deletions
|
|
@ -1,4 +1,6 @@
|
|||
#[derive(sqlx::Type, PartialEq, Debug, Clone)]
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(sqlx::Type, Serialize, Deserialize, PartialEq, Debug, Clone)]
|
||||
#[sqlx(type_name = "septa_route_type", rename_all = "snake_case")]
|
||||
pub enum RouteType {
|
||||
Trolley,
|
||||
|
|
@ -8,34 +10,11 @@ pub enum RouteType {
|
|||
TracklessTrolley
|
||||
}
|
||||
|
||||
#[derive(sqlx::Type, PartialEq, Debug, Clone)]
|
||||
#[sqlx(type_name = "septa_direction_type", rename_all = "snake_case")]
|
||||
pub enum CardinalDirection {
|
||||
Northbound,
|
||||
Southbound,
|
||||
Eastbound,
|
||||
Westbound // (and down)
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Directional {
|
||||
pub direction: CardinalDirection,
|
||||
pub direction_destination: String
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RouteDirectional {
|
||||
pub primary: Directional, // 0
|
||||
pub secondary: Directional, // 1
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(::sqlx::FromRow, Serialize, Deserialize, Debug, Clone)]
|
||||
pub struct Route {
|
||||
pub name: String,
|
||||
pub short_name: String,
|
||||
pub color_hex: String,
|
||||
pub route_type: RouteType,
|
||||
pub id: String,
|
||||
pub directional: RouteDirectional
|
||||
pub id: String
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue