added marks

This commit is contained in:
vextrixes committed 2026-10-25 11:24:38 +01:00
1 parent 3e40445b32
commit 5257dfde9b
3 files changed
+43 -2

No files matched your search

+3 -1
View File
@@ -4,6 +4,7 @@ mod attachment;
mod error;
mod events;
mod homework;
mod marks;
mod stdtype;
mod subjects;
mod user;
@@ -14,6 +15,7 @@ pub use attachment::Attachment;
pub use error::Error;
pub use events::Events;
pub use homework::{Homework, HomeworkListItem};
pub use marks::{Mark, Marks, SubjectMarks};
pub use stdtype::StdType;
pub use subjects::{Subject, Subjects};
pub use user::{Module, User};
pub use subjects::{Subject, Subjects};
+39
View File
@@ -0,0 +1,39 @@
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct Marks {
pub subjects: Vec<SubjectMarks>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SubjectMarks {
pub marks: Vec<Mark>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct Mark {
pub mark_date: DateTime<Utc>,
pub edit_date: DateTime<Utc>,
pub caption: String,
pub theme: String,
pub mark_text: String,
pub teacher_id: String,
pub r#type: String,
pub type_note: String,
pub weight: u8,
pub subject_id: String,
pub is_new: bool,
pub is_points: bool,
pub calculated_mark_text: String,
//ClassRankText:null,
pub id: String,
pub points_text: String,
pub max_points: u16,
pub confirmed_when: Option<DateTime<Utc>>,
pub confirmed_by: Option<String>,
pub mark_confirmation_state: String,
}
+1 -1
View File
@@ -7,7 +7,7 @@
- [x] Homework
- [ ] komens
- [ ] lesson
- [ ] marks
- [x] marks
- [ ] measures
- [ ] payments
- [x] subjects