35 lines
942 B
Rust
35 lines
942 B
Rust
use super::hh_mm_time_format;
|
|
use chrono::{NaiveDate, NaiveTime};
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Serialize, Debug)]
|
|
pub struct Reservation {
|
|
// This string might not be correct
|
|
pub auth_type: Option<String>,
|
|
pub email: String,
|
|
pub date: NaiveDate,
|
|
#[serde(with = "hh_mm_time_format")]
|
|
pub start_time: NaiveTime,
|
|
#[serde(with = "hh_mm_time_format")]
|
|
pub end_time: NaiveTime,
|
|
pub note: String,
|
|
pub user_firstname: String,
|
|
pub user_lastname: String,
|
|
pub user_phone: Option<String>,
|
|
pub person_count: u32,
|
|
}
|
|
|
|
#[derive(Deserialize, Debug)]
|
|
pub struct ReservationResponse {
|
|
pub reservation_id: u32,
|
|
// This string might not be correct
|
|
pub auth_type: Option<String>,
|
|
pub user_validation: bool,
|
|
// ticket_payload
|
|
pub email: String,
|
|
pub success: String,
|
|
#[serde(rename = "successMessage")]
|
|
pub success_message: String,
|
|
// cancellation_token
|
|
}
|