affluence/affluences-api/src/models.rs

41 lines
1.0 KiB
Rust

use serde::{Deserialize, Serialize};
#[derive(Deserialize, Debug)]
pub struct Hour {
pub hour: String,
pub state: u32,
// reservations
pub granularity: u32,
pub person_count: u32,
pub places_available: u32,
pub places_bookable: u32,
}
#[derive(Deserialize, Debug)]
pub struct Resource {
pub resource_id: u32,
pub resource_name: String,
pub resource_type: u32,
pub granularity: u32,
pub time_slot_count: u32,
pub static_time_slot: bool,
// reservations_by_timeslot
pub note_available: bool,
pub note_required: bool,
pub note_description: String,
pub description: String,
pub capacity: u32,
pub site_timezone: String,
pub user_name_required: bool,
pub user_phone_required: bool,
pub user_name_available: bool,
pub user_phone_available: bool,
// time_before_reservations_closed
// min_places_per_reservation
// max_places_per_reservation
pub image_url: Option<String>,
// services
pub slots_state: u32,
pub hours: Vec<Hour>,
}