added substitutions
This commit is contained in:
3 files changed
+27
-2
No files matched your search
+3
-1
@@ -8,6 +8,7 @@ mod marks;
|
||||
mod payments;
|
||||
mod stdtype;
|
||||
mod subjects;
|
||||
mod substitutions;
|
||||
mod themes;
|
||||
mod user;
|
||||
|
||||
@@ -18,8 +19,9 @@ pub use error::Error;
|
||||
pub use events::Events;
|
||||
pub use homework::{Homework, HomeworkListItem};
|
||||
pub use marks::{Mark, Marks, SubjectMarks};
|
||||
pub use payments::{ClassfundPayments, ClassfundSummary, Payment, PaymentMonthlyData, AddBalance};
|
||||
pub use payments::{AddBalance, ClassfundPayments, ClassfundSummary, Payment, PaymentMonthlyData};
|
||||
pub use stdtype::StdType;
|
||||
pub use subjects::{Subject, Subjects};
|
||||
pub use substitutions::{SubstitutionChange, Substitutions};
|
||||
pub use themes::{Theme, Themes};
|
||||
pub use user::{Module, User};
|
||||
@@ -0,0 +1,23 @@
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "PascalCase")]
|
||||
pub struct Substitutions {
|
||||
pub from: DateTime<Utc>,
|
||||
pub to: DateTime<Utc>,
|
||||
pub changes: Vec<SubstitutionChange>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "PascalCase")]
|
||||
pub struct SubstitutionChange {
|
||||
pub change_subject: Option<String>, //Unknown if string is the right type
|
||||
pub day: DateTime<Utc>,
|
||||
pub hours: String,
|
||||
pub change_type: String,
|
||||
pub description: String,
|
||||
pub time: String,
|
||||
pub type_abbrev: Option<String>, //Unknown if string is the right type,
|
||||
pub type_name: Option<String>, //Unknown if string is the right type
|
||||
}
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
- [ ] measures
|
||||
- [x] payments
|
||||
- [x] subjects
|
||||
- [ ] substitutions
|
||||
- [x] substitutions
|
||||
- [x] themes
|
||||
- [ ] timetable
|
||||
- [x] user
|
||||
|
||||
Reference in new issue
Block a user