feat: add user choosen custom prices

This commit is contained in:
swve 2024-10-31 16:12:32 +01:00
parent bf38fee68b
commit 3f96f1ec9f
3 changed files with 84 additions and 47 deletions

View file

@ -7,10 +7,15 @@ class PaymentProductTypeEnum(str, Enum):
SUBSCRIPTION = "subscription"
ONE_TIME = "one_time"
class PaymentPriceTypeEnum(str, Enum):
CUSTOMER_CHOICE = "customer_choice"
FIXED_PRICE = "fixed_price"
class PaymentsProductBase(SQLModel):
name: str = ""
description: Optional[str] = ""
product_type: PaymentProductTypeEnum = PaymentProductTypeEnum.ONE_TIME
price_type: PaymentPriceTypeEnum = PaymentPriceTypeEnum.FIXED_PRICE
benefits: str = ""
amount: float = 0.0
currency: str = "USD"