use crate::models;
use serde::{Deserialize, Serialize};
use serde_repr::{Serialize_repr,Deserialize_repr};
#[repr(i64)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr)]
pub enum SeverityValue {
Variant1 = 1,
Variant2 = 2,
Variant3 = 3,
Variant4 = 4,
}
impl std::fmt::Display for SeverityValue {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", match self {
Self::Variant1 => "1",
Self::Variant2 => "2",
Self::Variant3 => "3",
Self::Variant4 => "4",
})
}
}
impl Default for SeverityValue {
fn default() -> SeverityValue {
Self::Variant1
}
}