Automated Action b0d71975a9 Create simple Todo application with FastAPI and SQLite
- Set up project structure with FastAPI and SQLite
- Created Todo model and database schemas
- Implemented CRUD operations for Todo items
- Added Alembic for database migrations
- Added health check endpoint
- Used Ruff for code linting and formatting
- Updated README with project documentation
2025-05-17 13:05:20 +00:00

17 lines
512 B
Python

from datetime import datetime
from sqlalchemy import Boolean, Column, DateTime, Integer, String
from app.db.session 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=datetime.utcnow)
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)