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,7 +1,8 @@
|
|||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(sqlx::Type, Serialize, Deserialize, PartialEq, Debug, Clone, Copy, Eq)]
|
||||
#[derive(
|
||||
sqlx::Type, Serialize, Deserialize, PartialEq, Debug, Clone, Copy, Eq, PartialOrd, Ord,
|
||||
)]
|
||||
#[sqlx(type_name = "septa_direction_type", rename_all = "snake_case")]
|
||||
pub enum CardinalDirection {
|
||||
Northbound,
|
||||
|
|
@ -10,17 +11,17 @@ pub enum CardinalDirection {
|
|||
Westbound,
|
||||
Inbound,
|
||||
Outbound,
|
||||
Loop
|
||||
Loop,
|
||||
}
|
||||
|
||||
#[derive(::sqlx::Decode, Serialize, Deserialize, Debug, Clone)]
|
||||
pub struct Direction {
|
||||
pub direction: CardinalDirection,
|
||||
pub direction_destination: String
|
||||
pub direction_destination: String,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for CardinalDirection {
|
||||
fn fmt (&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
let output = match self {
|
||||
CardinalDirection::Northbound => "Northbound",
|
||||
CardinalDirection::Southbound => "Southbound",
|
||||
|
|
@ -28,7 +29,7 @@ impl std::fmt::Display for CardinalDirection {
|
|||
CardinalDirection::Westbound => "Westbound",
|
||||
CardinalDirection::Inbound => "Inbound",
|
||||
CardinalDirection::Outbound => "Outbound",
|
||||
CardinalDirection::Loop => "Loop"
|
||||
CardinalDirection::Loop => "Loop",
|
||||
};
|
||||
std::write!(f, "{}", output)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue