eeg_certs/backend/src/model/person.rs

36 lines
818 B
Rust
Raw Normal View History

use serde::Serialize;
2023-08-25 16:52:03 +00:00
#[derive(Serialize, Clone)]
2023-08-25 16:52:03 +00:00
pub struct Person {
/// Internal id
2023-08-25 16:52:03 +00:00
pub person_id: i32,
/// Country-specific id. For now only supports Peru's DNI.
///
/// Example: `74185293`
2023-08-25 16:52:03 +00:00
pub person_dni: String,
/// Names
///
/// Example: `Juan Carlos`
2023-08-25 16:52:03 +00:00
pub person_names: String,
/// First surname
///
/// Example: `Perez`
2023-08-25 16:52:03 +00:00
pub person_paternal_surname: String,
/// Second surname
///
/// Example: `Gomez`
2023-08-25 16:52:03 +00:00
pub person_maternal_surname: String,
}
impl Person {
pub fn default() -> Person {
Person {
person_id: -1,
person_dni: "".to_string(),
person_names: "".to_string(),
person_paternal_surname: "".to_string(),
person_maternal_surname: "".to_string(),
}
}
}