many changes
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Has been cancelled

This commit is contained in:
Nicholas Orlowsky 2025-09-12 19:08:22 -04:00
parent 4777f46a38
commit be177af6cd
No known key found for this signature in database
GPG key ID: A9F3BA4C0AA7A70B
25 changed files with 2059 additions and 47 deletions

View file

@ -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
}