emergencylib/dto/
report_request.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use serde::{Deserialize, Serialize};
use uuid::Uuid;
use crate::enums::emergency_status::EmergencyStatus;
use crate::enums::emergency_type::EmergencyType;
use crate::jsonb::emergency_details::EmergencyDetails;
use crate::jsonb::location::Location;

#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct ReportRequest {
    pub id: Option<Uuid>,
    pub org_id: Uuid,
    pub reporter: Uuid,
    pub emergency_type: EmergencyType,
    pub location: Location,
    pub details: EmergencyDetails,
    pub notify: Vec<String>,
    pub pictures: Vec<String>,
    pub status: EmergencyStatus,
}