feat: add custom exceptions
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from decimal import Decimal
|
||||
from pydantic import BaseModel,Field
|
||||
from src.application.domain.enums import OrderStatus
|
||||
|
||||
|
||||
class CreateOrder(BaseModel):
|
||||
@@ -8,3 +9,32 @@ class CreateOrder(BaseModel):
|
||||
gas_fee: Decimal = Field(gt=0, decimal_places=2, max_digits=20)
|
||||
total_price: Decimal = Field(gt=0, decimal_places=2, max_digits=20)
|
||||
|
||||
|
||||
class OrderPaymentResponse(BaseModel):
|
||||
id: str | None = None
|
||||
created_at: str | None = None
|
||||
updated_at: str | None = None
|
||||
user_id: str | None = None
|
||||
usdt_amount: str | None = None
|
||||
usdt_exchange_rate: str | None = None
|
||||
gas_fee: str | None = None
|
||||
total_price: str | None = None
|
||||
service_fee: str | None = None
|
||||
status: OrderStatus | None = None
|
||||
client_payment_id: str | None = None
|
||||
itpay_payment_qr_url_desktop: str | None = None
|
||||
itpay_payment_qr_url_android: str | None = None
|
||||
itpay_payment_qr_url_ios: str | None = None
|
||||
itpay_payment_qr_image_desktop: str | None = None
|
||||
itpay_payment_qr_image_android: str | None = None
|
||||
itpay_payment_qr_image_ios: str | None = None
|
||||
itpay_id: str | None = None
|
||||
itpay_qr_id: str | None = None
|
||||
itpay_amount: str | None = None
|
||||
itpay_created_at: str | None = None
|
||||
|
||||
|
||||
class CreateOrderResponse(BaseModel):
|
||||
status_code: int
|
||||
order: OrderPaymentResponse
|
||||
|
||||
|
||||
Reference in New Issue
Block a user