Automated Action ecb15eb903 Build complete task management tool with FastAPI
- Implemented full CRUD operations for tasks
- Added SQLite database with SQLAlchemy ORM
- Set up Alembic migrations for database schema
- Created health check and base URL endpoints
- Added CORS middleware for cross-origin requests
- Included comprehensive API documentation
- Updated README with complete project information
2025-06-20 03:21:46 +00:00

15 lines
607 B
Python

from sqlalchemy import Column, Integer, String, Text, DateTime, Boolean
from sqlalchemy.sql import func
from app.db.base import Base
class Task(Base):
__tablename__ = "tasks"
id = Column(Integer, primary_key=True, index=True)
title = Column(String(200), nullable=False)
description = Column(Text, nullable=True)
completed = Column(Boolean, default=False, nullable=False)
priority = Column(String(10), default="medium", nullable=False)
created_at = Column(DateTime(timezone=True), server_default=func.now())
updated_at = Column(DateTime(timezone=True), onupdate=func.now())