23 lines
602 B
Rust
23 lines
602 B
Rust
use serde::{Deserialize, Serialize};
|
|
use sqlx::types::Json as SqlxJson;
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
pub struct ListSchedulesQuery {
|
|
pub route_id: Option<String>,
|
|
pub stop_id: Option<i32>,
|
|
pub stop_code: Option<String>,
|
|
}
|
|
|
|
#[derive(Debug, Serialize, sqlx::FromRow)]
|
|
pub struct ScheduleRow {
|
|
pub id: i32,
|
|
pub route_id: String,
|
|
pub station_id: i32,
|
|
pub station_code: String,
|
|
pub station_name_th: String,
|
|
pub direction_note: Option<String>,
|
|
pub departure_times: Vec<String>,
|
|
pub variants: SqlxJson<serde_json::Value>,
|
|
pub schedule_note: Option<String>,
|
|
}
|