2022-08-13 15:00:22 +02:00
|
|
|
#[derive(Debug)]
|
2022-08-12 21:20:39 +02:00
|
|
|
pub struct Course {
|
2022-08-14 11:19:52 +02:00
|
|
|
/// Course's name
|
|
|
|
pub name: String,
|
|
|
|
|
2022-08-12 21:20:39 +02:00
|
|
|
/// Professor's name
|
2022-08-14 11:19:52 +02:00
|
|
|
pub professor: Option<String>,
|
2022-08-12 21:20:39 +02:00
|
|
|
|
|
|
|
/// List of rooms where the course takes place
|
2022-08-14 11:19:52 +02:00
|
|
|
pub room: String,
|
2022-08-12 21:20:39 +02:00
|
|
|
|
|
|
|
/// Time the course starts, as a number :
|
|
|
|
/// - 0 => first possible class of the day
|
|
|
|
/// - 1 => second possible class of the day
|
|
|
|
/// - etc.
|
2022-08-14 11:19:52 +02:00
|
|
|
pub start: usize,
|
2022-08-12 21:20:39 +02:00
|
|
|
|
|
|
|
/// Number of time slots the course takes up in the timetable
|
2022-08-14 11:19:52 +02:00
|
|
|
pub size: usize,
|
2022-08-16 11:57:36 +02:00
|
|
|
|
|
|
|
/// Datetime when the course start
|
|
|
|
/// Filled only when building for the ICS
|
|
|
|
pub dtstart: Option<chrono::DateTime<chrono::Utc>>,
|
|
|
|
|
|
|
|
/// Datetime when the course end
|
|
|
|
/// Filled only when building for the ICS
|
|
|
|
pub dtend: Option<chrono::DateTime<chrono::Utc>>,
|
2022-08-12 21:20:39 +02:00
|
|
|
}
|
2022-08-13 15:00:22 +02:00
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct Day {
|
|
|
|
/// Day's name
|
|
|
|
pub name: String,
|
|
|
|
/// Ordered list of all the courses of the day
|
|
|
|
pub courses: Vec<Option<Course>>,
|
|
|
|
}
|