forked from Anri/cal8tor
* Add courses names
* Change i8 to usize * Useless Vec for rooms * Professor are now an option
This commit is contained in:
parent
818c8eb40f
commit
db1a301258
1 changed files with 7 additions and 4 deletions
|
@ -1,19 +1,22 @@
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Course {
|
pub struct Course {
|
||||||
|
/// Course's name
|
||||||
|
pub name: String,
|
||||||
|
|
||||||
/// Professor's name
|
/// Professor's name
|
||||||
pub professor: String,
|
pub professor: Option<String>,
|
||||||
|
|
||||||
/// List of rooms where the course takes place
|
/// List of rooms where the course takes place
|
||||||
pub room: Vec<String>,
|
pub room: String,
|
||||||
|
|
||||||
/// Time the course starts, as a number :
|
/// Time the course starts, as a number :
|
||||||
/// - 0 => first possible class of the day
|
/// - 0 => first possible class of the day
|
||||||
/// - 1 => second possible class of the day
|
/// - 1 => second possible class of the day
|
||||||
/// - etc.
|
/// - etc.
|
||||||
pub start: i8,
|
pub start: usize,
|
||||||
|
|
||||||
/// Number of time slots the course takes up in the timetable
|
/// Number of time slots the course takes up in the timetable
|
||||||
pub size: i8,
|
pub size: usize,
|
||||||
}
|
}
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Day {
|
pub struct Day {
|
||||||
|
|
Reference in a new issue