added themes
This commit is contained in:
4 files changed
+27
-6
No files matched your search
@@ -7,6 +7,7 @@ mod homework;
|
||||
mod marks;
|
||||
mod stdtype;
|
||||
mod subjects;
|
||||
mod themes;
|
||||
mod user;
|
||||
|
||||
pub use absence::{Absence, AbsenceListItem, SubjectAbsence};
|
||||
@@ -18,4 +19,5 @@ pub use homework::{Homework, HomeworkListItem};
|
||||
pub use marks::{Mark, Marks, SubjectMarks};
|
||||
pub use stdtype::StdType;
|
||||
pub use subjects::{Subject, Subjects};
|
||||
pub use themes::{Theme, Themes};
|
||||
pub use user::{Module, User};
|
||||
@@ -0,0 +1,20 @@
|
||||
use crate::StdType;
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "PascalCase")]
|
||||
pub struct Themes {
|
||||
pub subject: StdType,
|
||||
pub themes: Vec<Theme>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "PascalCase")]
|
||||
pub struct Theme {
|
||||
pub date: DateTime<Utc>,
|
||||
pub theme: String,
|
||||
pub note: String,
|
||||
pub hour_caption: String,
|
||||
pub lesson_label: String,
|
||||
}
|
||||
+4
-5
@@ -18,7 +18,7 @@ pub struct User {
|
||||
pub study_year: u8,
|
||||
pub enabled_modules: Vec<Module>, //TODO: user SettingModules
|
||||
pub full_user_name: String,
|
||||
pub students: Vec<Student>
|
||||
pub students: Vec<Student>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
@@ -28,12 +28,11 @@ pub struct Module {
|
||||
pub rights: Vec<String>,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "PascalCase")]
|
||||
pub struct Student{
|
||||
pub struct Student {
|
||||
full_name: String,
|
||||
class: Vec<StdType>,
|
||||
school_type: String,
|
||||
study_year: u8
|
||||
}
|
||||
study_year: u8,
|
||||
}
|
||||
Reference in new issue
Block a user