Automated Action 76ee64db16 Create basic FastAPI Todo app project structure
- Add requirements.txt with FastAPI, uvicorn, SQLAlchemy, alembic, python-multipart, and ruff
- Create main.py with FastAPI app setup including CORS configuration
- Set up app directory structure with api/, db/, models/, and schemas/ subdirectories
- Add basic root endpoint with app info and health check endpoint
- Configure CORS to allow all origins
2025-06-20 02:25:19 +00:00

14 lines
534 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, nullable=False)
description = Column(String, nullable=True)
completed = Column(Boolean, default=False, nullable=False)
created_at = Column(DateTime(timezone=True), server_default=func.now())
updated_at = Column(DateTime(timezone=True), onupdate=func.now())