Automated Action 4cfc9775ae Create betting application API with FastAPI and SQLite
- Set up project structure with FastAPI and SQLite
- Implement user authentication with JWT
- Create database models for users, events, bets, and transactions
- Add API endpoints for user management
- Add API endpoints for events and betting functionality
- Add wallet management for deposits and withdrawals
- Configure Alembic for database migrations
- Add linting with Ruff
- Add documentation in README
2025-06-02 15:02:41 +00:00

35 lines
598 B
Python

from typing import Optional
from pydantic import BaseModel, EmailStr
class UserBase(BaseModel):
email: Optional[EmailStr] = None
full_name: Optional[str] = None
is_active: Optional[bool] = True
is_admin: bool = False
class UserCreate(UserBase):
email: EmailStr
password: str
class UserUpdate(UserBase):
password: Optional[str] = None
class UserInDBBase(UserBase):
id: Optional[int] = None
balance: float = 0.0
class Config:
from_attributes = True
class User(UserInDBBase):
pass
class UserInDB(UserInDBBase):
hashed_password: str