Files
bakalari-types/src/user.rs
T

39 lines
1005 B
Rust
Raw Normal View History

2026-10-25 11:02:35 +01:00
use serde::{Deserialize, Serialize};
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 12:14:28 +01:00
// TeacherClasses: Option TODO
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>,
//TODO: user SettingModules
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 12:14:28 +01:00
full_name: String,
class: Vec<StdType>,
school_type: String,
2026-10-25 12:25:31 +01:00
study_year: u8,
}