- Frontend: Next.js 14 with TypeScript - Backend: FastAPI with SQLAlchemy - Agent: Carmodoo sync agent - Deployment: Docker Compose based staging/production setup - Scripts: Automated deployment with rollback support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
45 lines
1.2 KiB
Python
45 lines
1.2 KiB
Python
from pydantic import BaseModel
|
|
from typing import Optional
|
|
from datetime import datetime
|
|
|
|
|
|
class WithdrawalRequestCreate(BaseModel):
|
|
"""Schema for creating a withdrawal request"""
|
|
amount: float
|
|
bank_name: str
|
|
bank_account: str
|
|
account_holder: str
|
|
|
|
|
|
class WithdrawalRequestResponse(BaseModel):
|
|
"""Schema for withdrawal request response"""
|
|
id: int
|
|
user_id: int
|
|
amount: float
|
|
tax_withheld: float
|
|
net_amount: float
|
|
bank_name: str
|
|
bank_account: str
|
|
account_holder: str
|
|
status: str
|
|
admin_note: Optional[str] = None
|
|
requested_at: datetime
|
|
processed_at: Optional[datetime] = None
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class WithdrawalProcess(BaseModel):
|
|
"""Schema for processing a withdrawal (admin)"""
|
|
status: str # approved, completed, rejected
|
|
admin_note: Optional[str] = None
|
|
|
|
|
|
class WithdrawalBalance(BaseModel):
|
|
"""Schema for user's withdrawal balance"""
|
|
total_earned: float # Total earnings (dealer commission + share rewards)
|
|
total_withdrawn: float # Total already withdrawn
|
|
pending_withdrawal: float # Currently pending withdrawal requests
|
|
available_balance: float # Available for withdrawal
|