BE-PR-006: Add Essential CRUD API under Proposals

- New router: /projects/{project_id}/proposals/{proposal_id}/essentials
  - GET (list), POST (create), GET/{id}, PATCH/{id}, DELETE/{id}
- All mutations restricted to open proposals only
- Permission: creator, project owner, or global admin
- Registered essentials router in main.py
- Updated GET /proposals/{id} to return ProposalDetailResponse with
  embedded essentials list
- Activity logging on all CRUD operations
This commit is contained in:
zhi
2026-03-30 07:16:30 +00:00
parent 8d2d467bd8
commit 431f4abe5a
3 changed files with 343 additions and 4 deletions

View File

@@ -61,6 +61,7 @@ from app.api.routers.proposals import router as proposals_router
from app.api.routers.proposes import router as proposes_router # legacy compat
from app.api.routers.milestone_actions import router as milestone_actions_router
from app.api.routers.meetings import router as meetings_router
from app.api.routers.essentials import router as essentials_router
app.include_router(auth_router)
app.include_router(tasks_router)
@@ -76,6 +77,7 @@ app.include_router(proposals_router)
app.include_router(proposes_router) # legacy compat
app.include_router(milestone_actions_router)
app.include_router(meetings_router)
app.include_router(essentials_router)
# Auto schema migration for lightweight deployments