feat(#679): add ActivityLog entity and CRUD endpoints#704
Merged
Conversation
- ActivityLog entity (date + decimal hours) with FK → OpportunityVolunteer (CASCADE) - GET /opportunity-volunteer/:id/activity-log — returns entries + totalHours + count - POST /opportunity-volunteer/:id/activity-log — create entry - PATCH /activity-log/:id — update entry - DELETE /activity-log/:id — delete entry - All routes restricted to COORDINATOR | AGENT | ADMIN roles - SDK upgraded to 0.0.111 (ApiActivityLog* types) - Migration: add-activity-log Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add transformer to decimal `hours` column so pg driver string is coerced to number at entity level instead of leaking as "2.50" - Extract dtoActivityLogEntry / dtoActivityLogGet; route handlers now go through DTO instead of returning raw entities - Remove redundant id <= 0 guards (idParamSchema already enforces minimum: 1) - Restrict PATCH/DELETE to COORDINATOR role via per-route authenticate() option; AGENT retains GET/POST access only Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
need4deed
approved these changes
Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #679
Summary
ActivityLogentity (date+ decimalhours, FK →OpportunityVolunteerwith CASCADE delete)GET /opportunity-volunteer/:id/activity-log— list all entries withtotalHours+countPOST /opportunity-volunteer/:id/activity-log— create a new entryPATCH /activity-log/:id— update an entryDELETE /activity-log/:id— remove an entryCOORDINATOR | AGENT | ADMIN; reads work for past matches (read-only visibility as agreed in the issue)0.0.111(ApiActivityLogEntry,ApiActivityLogGet,ApiActivityLogPost,ApiActivityLogPatch)add-activity-logcreates the table and FKTest plan
GET /opportunity-volunteer/:id/activity-logreturns{ data, totalHours, count }for a valid OV idPOSTcreates an entry and returns201with the created recordPATCHupdatesdate/hourson an existing entryDELETEremoves the entry; subsequent GET no longer shows itOpportunityVolunteercascades and removes its logs🤖 Generated with Claude Code