use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PerformanceRatings {
#[serde(rename = "Excellent")]
Excellent,
#[serde(rename = "Good")]
Good,
#[serde(rename = "Medium")]
Medium,
#[serde(rename = "None")]
None,
#[serde(rename = "Poor")]
Poor,
#[serde(rename = "VeryPoor")]
VeryPoor,
}
impl std::fmt::Display for PerformanceRatings {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::Excellent => write!(f, "Excellent"),
Self::Good => write!(f, "Good"),
Self::Medium => write!(f, "Medium"),
Self::None => write!(f, "None"),
Self::Poor => write!(f, "Poor"),
Self::VeryPoor => write!(f, "VeryPoor"),
}
}
}
impl Default for PerformanceRatings {
fn default() -> PerformanceRatings {
Self::Excellent
}
}