Automated Action 16d63c4168 Create FastAPI REST API service with SQLite database
- Set up FastAPI application with CORS support
- Implement SQLite database with SQLAlchemy ORM
- Create User model with CRUD operations
- Add Alembic for database migrations
- Include health check and documentation endpoints
- Set up proper project structure with organized modules
- Add comprehensive README with setup instructions
- Configure Ruff for code linting and formatting
2025-07-03 18:56:01 +00:00

23 lines
389 B
Python

from pydantic import BaseModel, EmailStr
from datetime import datetime
from typing import Optional
class UserBase(BaseModel):
email: EmailStr
name: str
is_active: bool = True
class UserCreate(UserBase):
pass
class UserResponse(UserBase):
id: int
created_at: datetime
updated_at: Optional[datetime] = None
class Config:
from_attributes = True