Automated Action c1765ee96b Implement Task Manager API
- Set up project structure with FastAPI
- Configure SQLite database with SQLAlchemy
- Create Task model with Alembic migrations
- Implement CRUD API endpoints for tasks
- Add health check and CORS configuration
- Update documentation
2025-06-04 08:04:34 +00:00

15 lines
646 B
Python

from sqlalchemy import Column, Integer, String, Text, Boolean, DateTime, func
from app.db.session import Base
class Task(Base):
__tablename__ = "tasks"
id = Column(Integer, primary_key=True, index=True)
title = Column(String(255), nullable=False, index=True)
description = Column(Text, nullable=True)
is_completed = Column(Boolean, default=False)
priority = Column(Integer, default=1) # 1=Low, 2=Medium, 3=High
due_date = Column(DateTime, nullable=True)
created_at = Column(DateTime, default=func.now(), nullable=False)
updated_at = Column(DateTime, default=func.now(), onupdate=func.now(), nullable=False)