Commit c57866bc authored by Your Name's avatar Your Name

feat(payments): add Pydantic models

parent 0052431f
......@@ -2,5 +2,15 @@
Payment system module
"""
from aisbf.payments.migrations import PaymentMigrations
from aisbf.payments.models import (
CryptoAddress,
CryptoWallet,
AddCryptoPaymentMethodRequest
)
__all__ = ['PaymentMigrations']
__all__ = [
'PaymentMigrations',
'CryptoAddress',
'CryptoWallet',
'AddCryptoPaymentMethodRequest'
]
"""
Pydantic models for payment system
"""
from pydantic import BaseModel
from typing import Optional
from datetime import datetime
from decimal import Decimal
class CryptoAddress(BaseModel):
"""Crypto address model"""
crypto_type: str
address: str
derivation_path: str
derivation_index: int
class CryptoWallet(BaseModel):
"""Crypto wallet balance model"""
crypto_type: str
balance_crypto: Decimal
balance_fiat: Decimal
last_sync_at: Optional[datetime] = None
class AddCryptoPaymentMethodRequest(BaseModel):
"""Request to add crypto payment method"""
crypto_type: str
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment