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:
AutonetSellCar Deploy
2025-12-30 13:24:39 +09:00
commit 1f0dcb1ddb
224 changed files with 55119 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
from pydantic import BaseModel, EmailStr
from typing import Optional
from datetime import datetime
class UserCreate(BaseModel):
email: EmailStr
password: str
name: Optional[str] = None
phone: Optional[str] = None
country: str = "Mongolia"
referred_by: Optional[str] = None # Referral code of the user who referred
class UserUpdate(BaseModel):
"""Schema for updating user profile"""
name: Optional[str] = None
phone: Optional[str] = None
country: Optional[str] = None
class UserResponse(BaseModel):
id: int
email: str
name: Optional[str] = None
phone: Optional[str] = None
country: str
is_active: bool
is_admin: bool = False
is_dealer: bool = False
cc_balance: float = 0.0 # Float to support fractional CC (e.g., 0.1 CC)
referral_code: Optional[str] = None # User's unique referral code
email_verified: bool = False
phone_verified: bool = False
created_at: datetime
class Config:
from_attributes = True
class CarViewResponse(BaseModel):
id: int
user_id: int
car_id: int
cc_paid: int
created_at: datetime
class Config:
from_attributes = True
class PurchaseViewRequest(BaseModel):
car_id: int
class Token(BaseModel):
access_token: str
token_type: str = "bearer"
class TokenData(BaseModel):
email: Optional[str] = None