Automated Action fd0d96616b Initial setup of FastAPI Todo Application
- Set up project structure
- Create FastAPI app with SQLite database
- Implement Todo API with CRUD operations
- Set up Alembic for database migrations
- Add health endpoint
- Create README with documentation
2025-05-27 10:47:50 +00:00

15 lines
500 B
Python

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