Initial commit: AutonetSellCar platform with deployment system
- 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>
This commit is contained in:
44
backend/app/schemas/withdrawal.py
Normal file
44
backend/app/schemas/withdrawal.py
Normal file
@@ -0,0 +1,44 @@
|
||||
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
|
||||
Reference in New Issue
Block a user