Automated Action 6341d8f5a0 Create Todo application with FastAPI and SQLite
- Set up project structure and requirements
- Create database models and connection setup using SQLAlchemy
- Set up Alembic migrations
- Create API endpoints for Todo CRUD operations
- Add health endpoint
- Update README with project information

generated with BackendIM... (backend.im)
2025-05-13 11:29:47 +00:00

25 lines
548 B
Python

from datetime import datetime
from typing import Optional
from pydantic import BaseModel
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
from_attributes = True