1
use chrono::{DateTime, Utc};
2
use serde::{Deserialize, Serialize};
3

            
4
630
#[derive(Debug, Serialize, Deserialize, Clone)]
5
pub struct ReviewType {
6
    pub name: String,
7
    pub organization: String,
8
    pub emails: Vec<String>,
9
}
10

            
11
117
#[derive(Debug, Serialize, Deserialize, Default, Clone)]
12
pub struct ReviewRequest {
13
    pub date: DateTime<Utc>,
14
    pub projectname: String,
15
    pub name: String,
16
    pub phone: Option<String>,
17
    pub email: String,
18
    pub programme: String,
19
    pub summary: String,
20
    pub www: String,
21
    pub i18n: bool,
22
    pub licensing: bool,
23
    pub testing: bool,
24
    pub community: bool,
25
    pub a11y: bool,
26
    pub packaging: bool,
27
    pub diversity: bool,
28
    pub standards: bool,
29
    pub security: bool,
30
    pub governance: bool,
31
    pub comments: String,
32
}
33

            
34
impl ReviewRequest {
35
    pub fn remove_personal_information(&mut self) {
36
        self.name.clear();
37
        self.email.clear();
38
        self.phone = None;
39
        // these fields are cleared to be on the safe side
40
        self.summary.clear();
41
        self.comments.clear();
42
    }
43
}
44

            
45
#[derive(Debug, Serialize, Deserialize, Default, Clone)]
46
pub struct Rejection {
47
    pub date: DateTime<Utc>,
48
    pub creator: String,
49
    pub request: String,
50
    pub review_type: String,
51
    pub rejection_comment: String,
52
}
53

            
54
#[derive(Debug, Serialize, Deserialize, Clone)]
55
pub struct Task {
56
    pub date: DateTime<Utc>,
57
    pub creator: String,
58
    pub request: String,
59
    pub review_type: String,
60
    pub assigned_organization: String,
61
    pub assignment_comment: String,
62
}
63

            
64
#[derive(Debug, Serialize, Deserialize, Clone)]
65
pub struct Report {
66
    pub date: DateTime<Utc>,
67
    pub creator: String,
68
    pub task: String,
69
    pub message: String,
70
    pub filename: Option<String>,
71
    pub fileid: Option<String>,
72
    pub rate_euros_per_hour: Option<f32>,
73
    pub time_spent_hours: Option<f32>,
74
}