added what if

This commit is contained in:
vextrixes committed 2026-10-25 14:46:36 +01:00
1 parent de122f8d74
commit ee9db9865e
3 files changed
+52 -1

No files matched your search

+2
View File
@@ -12,6 +12,7 @@ mod subjects;
mod substitutions;
mod themes;
mod user;
mod what_if;
pub use absence::{Absence, AbsenceListItem, SubjectAbsence};
pub use api_info::ApiInfo;
@@ -27,3 +28,4 @@ pub use subjects::{Subject, Subjects};
pub use substitutions::{SubstitutionChange, Substitutions};
pub use themes::{Theme, Themes};
pub use user::{Module, User};
pub use what_if::{WhatIfResult, WhatIfResultMark, WhatIfStartingEnviromentMark};
+49
View File
@@ -0,0 +1,49 @@
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use crate::StdType;
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct WhatIfStartingEnviromentMark {
id: String,
mark_text: String,
weight: u8,
max_points: u16,
subject_id: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct WhatIfResult {
pub marks: Vec<WhatIfResultMark>,
pub subject: StdType,
pub average_text: String,
pub temporary_mark: String,
pub subject_note: String,
pub temporary_mark_note: String,
pub points_only: bool,
pub mark_prediction_enabled: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct WhatIfResultMark {
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: Option unknown,
pub id: String,
pub points_text: String,
pub max_points: u16,
}