diff --git a/libs/shared-entity/src/dto/billing_dto.rs b/libs/shared-entity/src/dto/billing_dto.rs index fb71f465..5303b545 100644 --- a/libs/shared-entity/src/dto/billing_dto.rs +++ b/libs/shared-entity/src/dto/billing_dto.rs @@ -28,9 +28,9 @@ impl TryFrom for RecurringInterval { } } -impl Into for RecurringInterval { - fn into(self) -> i16 { - match self { +impl From for i16 { + fn from(value: RecurringInterval) -> Self { + match value { RecurringInterval::Month => 0, RecurringInterval::Year => 1, } @@ -64,9 +64,9 @@ impl TryFrom for SubscriptionPlan { } } -impl Into for SubscriptionPlan { - fn into(self) -> i16 { - match self { +impl From for i16 { + fn from(value: SubscriptionPlan) -> Self { + match value { SubscriptionPlan::Free => 0, SubscriptionPlan::Pro => 1, SubscriptionPlan::Team => 2,