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

            
4
756
#[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
129
#[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 uxtesting: bool,
32
    pub technicalwriting: bool,
33
    pub comments: String,
34
}
35

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

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

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

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