Automated Action c139318961 Implement simple Todo application with FastAPI and SQLite
- Set up project structure with FastAPI application
- Create Todo model and related Pydantic schemas
- Implement CRUD operations for Todo items
- Add health endpoint for application monitoring
- Configure database connection with SQLite
- Create database migrations with Alembic
- Update documentation with setup and usage instructions

generated with BackendIM... (backend.im)
2025-05-12 16:30:31 +00:00

12 lines
487 B
Python

from sqlalchemy import Column, Integer, String, Boolean, DateTime, func
from app.db.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(timezone=True), server_default=func.now())
updated_at = Column(DateTime(timezone=True), onupdate=func.now())