septastic/libseptastic/src/route.rs
Nicholas Orlowsky 5539c8521d
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Failing after 10m5s
add load time and autofocus
2025-10-06 21:25:40 -04:00

28 lines
693 B
Rust

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,
SubwayElevated,
RegionalRail,
Bus,
TracklessTrolley
}
#[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
}
#[derive(::sqlx::FromRow, Serialize, Deserialize, Debug, Clone)]
pub struct InterlinedRoute {
pub interline_id: String,
pub interline_name: String,
pub interlined_routes: Vec<String>
}