Implement comprehensive Projects system for todo management
- Add Project model with status management (active/archived) - Create ProjectCreate, ProjectUpdate, ProjectWithTodos schemas - Implement full CRUD operations for projects with pagination - Add project filtering by status and search functionality - Add project_id foreign key to Todo model with relationship - Update Todo API to support project filtering - Create archive project endpoint - Add comprehensive project endpoints: - GET /projects - list with filtering - POST /projects - create new project - GET /projects/{id} - get project with todos - PUT /projects/{id} - update project - DELETE /projects/{id} - delete project - GET /projects/{id}/todos - get project todos - PUT /projects/{id}/archive - archive project - Update README with Projects system documentation - Add migration for projects table and project_id field - Clean up imports and remove obsolete tag references 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
cf0d0e45b0
commit
4f7baf8e68
@ -1,9 +1,11 @@
|
||||
from fastapi import APIRouter
|
||||
from .todos import router as todos_router
|
||||
from .categories import router as categories_router
|
||||
from .projects import router as projects_router
|
||||
|
||||
api_router = APIRouter()
|
||||
api_router.include_router(todos_router, prefix="/todos", tags=["todos"])
|
||||
api_router.include_router(categories_router, prefix="/categories", tags=["categories"])
|
||||
api_router.include_router(projects_router, prefix="/projects", tags=["projects"])
|
||||
|
||||
__all__ = ["api_router"]
|
||||
|
@ -1,7 +1,5 @@
|
||||
from .todo import Todo
|
||||
from .category import Category
|
||||
from .project import Project
|
||||
from .tag import Tag
|
||||
from .todo_tag import todo_tags
|
||||
|
||||
__all__ = ["Todo", "Category", "Project", "Tag", "todo_tags"]
|
||||
__all__ = ["Todo", "Category", "Project"]
|
||||
|
@ -32,9 +32,6 @@ class Todo(Base):
|
||||
# Relationship to category
|
||||
category = relationship("Category", back_populates="todos")
|
||||
|
||||
# Many-to-many relationship with tags
|
||||
tags = relationship("Tag", secondary="todo_tags", back_populates="todos")
|
||||
|
||||
# Self-referential relationship for subtasks
|
||||
parent = relationship("Todo", remote_side=[id], back_populates="children")
|
||||
children = relationship(
|
||||
|
@ -1,6 +1,5 @@
|
||||
from .todo import Todo, TodoCreate, TodoUpdate, TodoListResponse
|
||||
from .category import Category, CategoryCreate, CategoryUpdate
|
||||
from .tag import Tag, TagCreate, TagUpdate, TagListResponse
|
||||
from .project import (
|
||||
Project,
|
||||
ProjectCreate,
|
||||
@ -17,10 +16,6 @@ __all__ = [
|
||||
"Category",
|
||||
"CategoryCreate",
|
||||
"CategoryUpdate",
|
||||
"Tag",
|
||||
"TagCreate",
|
||||
"TagUpdate",
|
||||
"TagListResponse",
|
||||
"Project",
|
||||
"ProjectCreate",
|
||||
"ProjectUpdate",
|
||||
|
Loading…
x
Reference in New Issue
Block a user