added homework and atachments

This commit is contained in:
vextrixes committed 2026-10-24 19:57:28 +02:00
1 parent f8db5881a6
commit bf57b813b1
6 files changed
+73 -29

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use crate::{Attachment, StdType};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct Homework {
pub homeworks: Vec<HomeworkListItem>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct HomeworkListItem {
#[serde(rename = "ID")]
pub id: String,
pub date_start: DateTime<Utc>,
pub date_end: DateTime<Utc>,
pub content: String,
pub notice: String,
pub done: bool,
pub closed: bool,
pub electronic: bool,
pub hour: u8,
pub class: StdType,
pub group: StdType,
pub subject: StdType,
pub teacher: StdType,
pub attachments: Vec<Attachment>,
pub finished: bool,
}