[353] line api#215
Conversation
[518] mongo policy 반복/즉시/관리자 mongo db 로그 생성
|
정책 위반: main에는 dev에서만 PR이 가능합니다. 이 PR은 자동으로 닫습니다. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
📝 WalkthroughWalkthroughThis PR introduces policy change history tracking to MongoDB and refactors related code. It migrates individualThreshold from Integer to Long across DTOs and mappers, adds updatedAt fields to response DTOs, creates PolicyHistory entity and repository, implements PolicyHistoryService with recursive diff logic, and integrates history logging throughout service layers. Changes
Sequence DiagramsequenceDiagram
participant Service as AdminPolicyServiceImpl/<br/>UserPolicyServiceImpl
participant History as PolicyHistoryService
participant Diff as DiffLogic
participant Repo as PolicyHistoryRepository
participant DB as MongoDB
Service->>Service: Create/Update/Delete Policy
Service->>History: log(tableName, event, targetId,<br/>before, after)
History->>History: Retrieve authenticated user
History->>Diff: calculateDetails(before, after)
Diff->>Diff: recursiveDiff(before, after)
Note over Diff: Compare nested objects,<br/>maps, and lists
Diff-->>History: UpdateDetail with changes
History->>Repo: save(PolicyHistory)
Repo->>DB: Persist to MongoDB
DB-->>Repo: Success
Repo-->>History: Saved entity
History-->>Service: Log complete
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can enforce grammar and style rules using `languagetool`.Configure the |
|
정책 위반: main에는 dev에서만 PR이 가능합니다. 이 PR은 자동으로 닫습니다. |
개요
관련 BackLog
Resolves: (Backlog Number, ...)
PR 유형
PR Checklist
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes