use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ReasonComment {
#[serde(rename = "APPOINTMENT_REQUESTED_BY_MISTAKE")]
AppointmentRequestedByMistake,
#[serde(rename = "VEHICLE_DELAY")]
VehicleDelay,
#[serde(rename = "SLOT_NOT_SUITABLE")]
SlotNotSuitable,
#[serde(rename = "OUTSIDE_CARRIER_BUSINESS_HOURS")]
OutsideCarrierBusinessHours,
#[serde(rename = "UNFAVOURABLE_EXTERNAL_CONDITIONS")]
UnfavourableExternalConditions,
#[serde(rename = "PROCUREMENT_DELAY")]
ProcurementDelay,
#[serde(rename = "SHIPPING_PLAN_CHANGED")]
ShippingPlanChanged,
#[serde(rename = "INCREASED_QUANTITY")]
IncreasedQuantity,
#[serde(rename = "OTHER")]
Other,
}
impl std::fmt::Display for ReasonComment {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::AppointmentRequestedByMistake => write!(f, "APPOINTMENT_REQUESTED_BY_MISTAKE"),
Self::VehicleDelay => write!(f, "VEHICLE_DELAY"),
Self::SlotNotSuitable => write!(f, "SLOT_NOT_SUITABLE"),
Self::OutsideCarrierBusinessHours => write!(f, "OUTSIDE_CARRIER_BUSINESS_HOURS"),
Self::UnfavourableExternalConditions => write!(f, "UNFAVOURABLE_EXTERNAL_CONDITIONS"),
Self::ProcurementDelay => write!(f, "PROCUREMENT_DELAY"),
Self::ShippingPlanChanged => write!(f, "SHIPPING_PLAN_CHANGED"),
Self::IncreasedQuantity => write!(f, "INCREASED_QUANTITY"),
Self::Other => write!(f, "OTHER"),
}
}
}
impl Default for ReasonComment {
fn default() -> ReasonComment {
Self::AppointmentRequestedByMistake
}
}