Skip to content

feat: maintenance request photo upload/view/delete API (Story 20.4)#368

Merged
daveharmswebdev merged 1 commit intomainfrom
story/20-4-maintenance-request-photos
Apr 14, 2026
Merged

feat: maintenance request photo upload/view/delete API (Story 20.4)#368
daveharmswebdev merged 1 commit intomainfrom
story/20-4-maintenance-request-photos

Conversation

@daveharmswebdev
Copy link
Copy Markdown
Owner

Summary

  • Add MaintenanceRequestPhoto domain entity with S3 presigned URL support for tenant maintenance request photos
  • Implement 4 CQRS endpoints: generate upload URL, confirm upload, get photos, delete photo (with primary promotion)
  • Tenant property scoping enforced on all handlers — tenants can only manage photos for their assigned property's requests
  • 35 unit tests covering happy paths, validation, error cases, and tenant isolation

Acceptance Criteria

  • AC-20.4.1: Presigned upload URL scoped to maintenance request photos
  • AC-20.4.2: Confirm upload creates MaintenanceRequestPhoto record
  • AC-20.4.3: View request returns presigned download URLs for photos
  • AC-20.4.4: Entity has required fields (Id, MaintenanceRequestId, S3Key, FileName, ContentType, FileSize, DisplayOrder)
  • AC-20.4.5: Photos ordered by DisplayOrder
  • AC-20.4.6: Delete removes from S3 and DB, promotes next photo to primary
  • AC-20.4.7: EF Core migration with proper FKs and indexes
  • AC-20.4.8: Tenant scoping on all endpoints

Test Results

  • Backend: 1,814 tests passing (0 failures)
  • Frontend: 2,703 tests passing (0 failures)
  • E2E: 212/213 passing (1 pre-existing failure, unrelated)

Test plan

  • CI passes (backend build + test, frontend build + test)
  • Verify new migration applies cleanly on fresh database
  • Verify Swagger shows 4 new endpoints under /api/v1/maintenance-requests/{id}/photos

🤖 Generated with Claude Code

Add MaintenanceRequestPhoto entity and CQRS handlers for presigned S3
upload URLs, upload confirmation, photo retrieval, and deletion with
primary photo promotion. Includes tenant property scoping on all
endpoints and 35 unit tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@daveharmswebdev daveharmswebdev merged commit 5ab8eb4 into main Apr 14, 2026
7 checks passed
@daveharmswebdev daveharmswebdev deleted the story/20-4-maintenance-request-photos branch April 14, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant