Automated Action 2e537b276d Add Todo API implementation
- Set up project structure with FastAPI, SQLAlchemy, and Alembic
- Create Todo model and database operations
- Implement CRUD API endpoints for Todo items
- Configure database migrations
- Add comprehensive documentation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-11 15:46:42 +00:00

14 lines
495 B
Python

from sqlalchemy import Column, Integer, String, Boolean, DateTime
from sqlalchemy.sql import func
from app.db.base import Base
class Todo(Base):
__tablename__ = "todos"
id = Column(Integer, primary_key=True, index=True)
title = Column(String, index=True)
description = Column(String)
completed = Column(Boolean, default=False)
created_at = Column(DateTime(timezone=True), server_default=func.now())
updated_at = Column(DateTime(timezone=True), onupdate=func.now())