osdm_sys/models/
document_type.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
17pub enum DocumentType {
18 #[serde(rename = "BOOKING_RECEIPT")]
19 BookingReceipt,
20 #[serde(rename = "CO2_REPORT")]
21 Co2Report,
22 #[serde(rename = "INFORMATION")]
23 Information,
24 #[serde(rename = "COMPLAINT_EXPLANATION")]
25 ComplaintExplanation,
26
27}
28
29impl std::fmt::Display for DocumentType {
30 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
31 match self {
32 Self::BookingReceipt => write!(f, "BOOKING_RECEIPT"),
33 Self::Co2Report => write!(f, "CO2_REPORT"),
34 Self::Information => write!(f, "INFORMATION"),
35 Self::ComplaintExplanation => write!(f, "COMPLAINT_EXPLANATION"),
36 }
37 }
38}
39
40impl Default for DocumentType {
41 fn default() -> DocumentType {
42 Self::BookingReceipt
43 }
44}
45