2026-10-25 11:02:35 +01:00
|
|
|
use serde::{Deserialize, Serialize};
|
2026-10-25 14:36:47 +01:00
|
|
|
use serde_json::Value;
|
|
|
|
|
use std::collections::HashMap;
|
2026-10-25 11:02:35 +01:00
|
|
|
|
|
|
|
|
use crate::StdType;
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
|
|
|
#[serde(rename_all = "PascalCase")]
|
2026-10-25 11:10:01 +01:00
|
|
|
pub struct User {
|
|
|
|
|
#[serde(rename = "UserUID")]
|
2026-10-25 11:02:35 +01:00
|
|
|
pub user_uid: String,
|
|
|
|
|
pub campaign_category_code: String,
|
|
|
|
|
pub class: StdType,
|
2026-10-25 17:33:04 +01:00
|
|
|
// TeacherClasses: Option<> TODO unknown
|
2026-10-25 11:02:35 +01:00
|
|
|
pub full_name: String,
|
|
|
|
|
pub school_organization_name: String,
|
|
|
|
|
pub school_type: Option<String>,
|
|
|
|
|
pub user_type: String,
|
|
|
|
|
pub user_type_text: String,
|
|
|
|
|
pub study_year: u8,
|
2026-10-25 13:51:57 +01:00
|
|
|
pub enabled_modules: Vec<Module>,
|
2026-10-25 14:36:47 +01:00
|
|
|
pub setting_modules: HashMap<String, Value>,
|
2026-10-25 12:14:28 +01:00
|
|
|
pub full_user_name: String,
|
2026-10-25 12:25:31 +01:00
|
|
|
pub students: Vec<Student>,
|
2026-10-25 11:02:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
|
|
|
#[serde(rename_all = "PascalCase")]
|
2026-10-25 11:10:01 +01:00
|
|
|
pub struct Module {
|
2026-10-25 11:02:35 +01:00
|
|
|
pub module: String,
|
2026-10-25 11:10:01 +01:00
|
|
|
pub rights: Vec<String>,
|
|
|
|
|
}
|
2026-10-25 12:14:28 +01:00
|
|
|
|
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
|
|
|
#[serde(rename_all = "PascalCase")]
|
2026-10-25 12:25:31 +01:00
|
|
|
pub struct Student {
|
2026-10-25 14:58:00 +01:00
|
|
|
pub full_name: String,
|
|
|
|
|
pub class: Vec<StdType>,
|
|
|
|
|
pub school_type: String,
|
|
|
|
|
pub study_year: u8,
|
2026-10-25 12:25:31 +01:00
|
|
|
}
|