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
    #[serde(default)]
32
    pub uxtesting: bool,
33
    #[serde(default)]
34
    pub technicalwriting: bool,
35
    pub comments: String,
36
}
37

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

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

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

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