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

13 lines
504 B
Python

from sqlalchemy import Column, Integer, String, Boolean, DateTime
from sqlalchemy.sql import func
from app.database.database 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())