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