diff --git a/libs/shared-entity/src/dto/billing_dto.rs b/libs/shared-entity/src/dto/billing_dto.rs index 5303b545..bcd7c544 100644 --- a/libs/shared-entity/src/dto/billing_dto.rs +++ b/libs/shared-entity/src/dto/billing_dto.rs @@ -28,16 +28,7 @@ impl TryFrom for RecurringInterval { } } -impl From for i16 { - fn from(value: RecurringInterval) -> Self { - match value { - RecurringInterval::Month => 0, - RecurringInterval::Year => 1, - } - } -} - -#[derive(Deserialize, Debug)] +#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] #[serde(rename_all = "snake_case")] #[repr(i16)] pub enum SubscriptionPlan { @@ -64,18 +55,6 @@ impl TryFrom for SubscriptionPlan { } } -impl From for i16 { - fn from(value: SubscriptionPlan) -> Self { - match value { - SubscriptionPlan::Free => 0, - SubscriptionPlan::Pro => 1, - SubscriptionPlan::Team => 2, - SubscriptionPlan::AiMax => 3, - SubscriptionPlan::AiLocal => 4, - } - } -} - impl AsRef for SubscriptionPlan { fn as_ref(&self) -> &str { match self {