Automated Action f58b91f04c Create simple todo app with FastAPI and SQLite
- Set up project structure with FastAPI and SQLite
- Implement Todo model and CRUD operations
- Add health endpoint for application monitoring
- Configure Alembic for database migrations
- Add comprehensive documentation

generated with BackendIM... (backend.im)
2025-05-13 00:25:36 +00:00

24 lines
517 B
Python

from pydantic import BaseModel
from datetime import datetime
from typing import Optional
class TodoBase(BaseModel):
title: str
description: Optional[str] = None
completed: bool = False
class TodoCreate(TodoBase):
pass
class TodoUpdate(BaseModel):
title: Optional[str] = None
description: Optional[str] = None
completed: Optional[bool] = None
class Todo(TodoBase):
id: int
created_at: datetime
updated_at: Optional[datetime] = None
class Config:
orm_mode = True