userlib/dto/
save_from_xlsx_response.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
use serde::{Deserialize, Serialize};

use crate::dto::response_status::ResponseStatus;

#[derive(Serialize, Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct SaveFromXLSXResponse {
    pub first_name: String,
    pub last_name: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub middle_name: Option<String>,
    pub role: String,
    pub email: String,
    pub index: u32,
    pub status: Vec<ResponseStatus>,
}

impl SaveFromXLSXResponse {
    pub fn new() -> SaveFromXLSXResponse {
        SaveFromXLSXResponse {
            first_name: "".to_string(),
            last_name: "".to_string(),
            middle_name: Option::from("".to_string()),
            role: "".to_string(),
            email: "".to_string(),
            index: 0,
            status: vec![],
        }
    }
}