-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.rs
65 lines (61 loc) · 1.73 KB
/
models.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
use serde::{Deserialize, Serialize};
#[allow(dead_code)]
#[derive(Deserialize, Debug)]
pub struct CourseList {
pub count: u32,
#[serde(rename = "hasMore")]
pub has_more: bool,
pub items: Vec<Course>,
pub limit: u32,
pub offset: u32,
}
#[allow(dead_code)]
#[derive(Deserialize, Debug)]
pub struct Course {
pub id_cursus: u32,
pub cursus: String,
pub cursus_korte_naam: String,
}
// Registering for a course requires the entire test details
#[derive(Serialize, Deserialize, Debug, PartialEq, Default, Clone)]
pub struct TestList {
pub id_cursus: u32,
pub studentnummer: String,
pub cursus: String,
pub collegejaar: u32,
pub cursus_korte_naam: String,
pub opmerking_cursus: String,
pub punten: u8,
pub punteneenheid: String,
pub coordinerend_onderdeel_oms: String,
pub faculteit_naam: String,
pub categorie_omschrijving: String,
pub cursustype_omschrijving: String,
pub onderdeel_van: String,
pub toetsen: Vec<Test>,
}
#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
pub struct Test {
pub id_cursus: u32,
pub id_toets_gelegenheid: u32,
pub toets: String,
pub toets_omschrijving: String,
pub toetsvorm_omschrijving: String,
pub opmerking_cursus_toets: String,
pub aanvangsblok: String,
pub onderwijsvorm: String,
pub onderwijsvorm_omschrijving: String,
pub blok: String,
pub periode_omschrijving: String,
pub gelegenheid: u8,
pub beschikbare_plekken: Option<u32>,
pub toetsdatum: String,
pub dag: String,
pub tijd_vanaf: f64,
pub tijd_tm: f64,
pub locatie: String,
pub locatie_x: String,
pub locatie_y: String,
pub eerder_voldoende_behaald: String,
pub voorzieningen: Vec<String>,
}