feat: 장부 통합 report의 members/categories를 월별로 응답한다#19
Merged
Conversation
- 최상위 members/categories 필드 제거 - MonthlyReport 내부에 members/categories 필드 추가 - 월별 멤버/카테고리의 share 분모는 해당 월 합계 기준 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
LedgerReportResponse의 최상위members/categories필드를 제거하고,MonthlyReport내부로 옮겨 월별 멤버/카테고리 집계를 응답하도록 변경합니다.기존 구조에서는 요청 기간 전체에 대한 합계 1세트만 응답되어, 클라이언트가 월별 breakdown을 받으려면 월 단위로 요청을 끊어야 했습니다. 변경 후엔 임의 기간(예: 1~5월)을 한 번에 요청해도
monthly배열의 각 월 안에서 멤버/카테고리 데이터를 받을 수 있습니다.변경 내역
LedgerReportResponse: 최상위members,categories필드 제거LedgerReportResponse.MonthlyReport:members: List<MemberReport>,categories: List<CategoryReport>필드 추가LedgerReportReader.generateMonthlyReports: 각 월의monthDetails로generateMemberReports,generateCategoryReports호출incomeShare/expenseShare분모는 해당 월 합계(monthIncome,monthExpense) 기준members: [],categories: []로 row 유지응답 예시 (1~5월 요청)
{ "totalIncome": 0, "totalExpense": 0, "totalBalance": 0, "monthly": [ { "year": 2024, "month": 1, "income": 0, "expense": 0, "netAmount": 0, "incomeShareOfPeriod": 0, "expenseShareOfPeriod": 0, "members": [ { "userId": 0, "nickname": "...", "income": 0, "expense": 0, "incomeShare": 0, "expenseShare": 0 } ], "categories": [ { "name": "...", "income": 0, "expense": 0, "incomeShare": 0, "expenseShare": 0 } ] }, ... ] }Test plan
monthly가 5개 원소를 갖는지 확인members/categories가 해당 월 데이터만 반영하는지 확인members: [],categories: []로 응답되는지 확인members/categories제거,monthly[].members/categories추가) 반영🤖 Generated with Claude Code