use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use crate::{StdClassGroup, StdType}; #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct Timetable { pub hours: Vec, pub days: Vec, pub classes: Vec, pub groups: Vec, pub subjects: Vec, pub teachers: Vec, pub rooms: Vec, pub cycles: Vec, } #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct TimetableHour { pub id: u8, pub caption: String, pub begin_time: String, pub end_time: String, } #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct TimetableDay { pub atoms: Vec, pub day_of_week: u8, pub date: DateTime, pub day_description: String, pub day_type: String, } #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct TimetableAtom { pub hour_id: u8, pub group_ids: Vec, pub subject_id: Option, pub teacher_id: Option, pub room_id: Option, pub cycle_ids: Vec, pub change: Option, pub homework_ids: Vec, pub theme: Option, } #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct TimetableChange { pub change_subject: Option, pub day: DateTime, pub hours: String, pub change_type: String, pub description: String, pub time: String, pub type_abbrev: Option, pub type_name: Option, }