artifacts/models/
subscription_plan.rs1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
7#[cfg_attr(feature = "specta", derive(specta::Type))]
8#[derive(Default)]
9pub enum SubscriptionPlan {
10 #[serde(rename = "monthly")]
11 #[default]
12 Monthly,
13 #[serde(rename = "annual")]
14 Annual,
15 #[serde(rename = "prepaid")]
16 Prepaid,
17}
18
19impl std::fmt::Display for SubscriptionPlan {
20 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
21 match self {
22 Self::Monthly => write!(f, "monthly"),
23 Self::Annual => write!(f, "annual"),
24 Self::Prepaid => write!(f, "prepaid"),
25 }
26 }
27}