Skip to content

Conversation

@kiki0518
Copy link
Contributor

@kiki0518 kiki0518 commented Apr 17, 2025

Type of changes

Feature

Purpose

Add read tracking API for users to mark Issue or Viewpoint replies as read.

Additional Information

  • Create ReadEntity with a composite primary key (userId, objectId, objectType) to track read status.
  • Support both POST to update and GET to retrieve read status.
  • Add controller endpoints for Issue and Viewpoint types.
  • Add three POST, three GET endpoints:
    • POST GET /api/read/issue/{id}
    • POST GET /api/read/viewpoint/{id}
    • POST GET /api/read/reply/{id}
  • POST endpoints is for setting readStatus of that object to "TRUE"
  • Use @LastModifiedDate to automatically update the updatedAt field.
  • Avoid using @mapsid to allow nullable foreign keys for issue and viewpoint.
  • Optimize query performance with repository methods and planned indexing on userId and objectId.
    Create ReadEntity with a composite primary key (userId, objectId, objectType) to track read status.

@github-actions
Copy link

github-actions bot commented Apr 17, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ JAVA checkstyle 31 0 0 4.21s
✅ REPOSITORY dustilock yes no no 0.45s
✅ REPOSITORY gitleaks yes no no 2.05s
✅ REPOSITORY git_diff yes no no 0.01s
✅ REPOSITORY grype yes no no 27.01s
✅ REPOSITORY secretlint yes no no 2.3s
✅ REPOSITORY syft yes no no 2.76s
✅ REPOSITORY trivy-sbom yes no no 0.65s
✅ REPOSITORY trufflehog yes no no 5.21s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@kiki0518 kiki0518 changed the title Feat/add read api Add read api Apr 24, 2025
@kiki0518 kiki0518 self-assigned this Apr 24, 2025
@kiki0518 kiki0518 requested a review from Kyle9410-Chen May 17, 2025 15:45
@kiki0518 kiki0518 requested a review from Kyle9410-Chen May 17, 2025 17:52
@Kyle9410-Chen Kyle9410-Chen merged commit c57f118 into main May 17, 2025
3 checks passed
@Kyle9410-Chen Kyle9410-Chen deleted the feat/add-read-api branch May 17, 2025 20:54
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.

2 participants