-
Notifications
You must be signed in to change notification settings - Fork 0
[FEAT] 월간 캘린더 시간형 실행 항목 조회 API 추가 #296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
85 changes: 85 additions & 0 deletions
85
src/main/java/com/tryna/domain/action/dto/MonthlyTimedActionItemResponse.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| package com.tryna.domain.action.dto; | ||
|
|
||
| import com.tryna.domain.action.enums.ActionItemStatus; | ||
| import com.tryna.domain.action.enums.CreatedBy; | ||
| import com.tryna.domain.action.enums.ItemType; | ||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import java.time.LocalDate; | ||
| import java.time.LocalDateTime; | ||
| import java.util.List; | ||
|
|
||
| @Schema(description = "F104-2 월간 캘린더 내 시간형 실행 항목 조회 응답 DTO") | ||
| public record MonthlyTimedActionItemResponse( | ||
|
|
||
| @Schema(description = "조회 연도", example = "2026") | ||
| Integer year, | ||
|
|
||
| @Schema(description = "조회 월", example = "8") | ||
| Integer month, | ||
|
|
||
| @Schema(description = "조회 월에 표시할 시간형 실행 항목 목록") | ||
| List<Item> items | ||
|
|
||
| ) { | ||
| @Schema(description = "월간 캘린더에 표시할 시간형 실행 항목") | ||
| public record Item( | ||
|
|
||
| @Schema(description = "준비/실행 항목 ID", example = "10") | ||
| Long actionItemId, | ||
|
|
||
| @Schema(description = "연결된 일정 ID", example = "1") | ||
| Long parentEventId, | ||
|
|
||
| @Schema(description = "항목이 속한 부모 일정 회차 날짜", example = "2026-09-02") | ||
| LocalDate parentOccurrenceDate, | ||
|
|
||
| @Schema(description = "연결된 일정 제목", example = "엄마 생신") | ||
| String parentEventTitle, | ||
|
|
||
| @Schema(description = "현재 사용자의 부모 일정 라벨 ID", example = "110") | ||
| Long labelId, | ||
|
|
||
| @Schema(description = "준비/실행 항목 제목", example = "꽃다발 준비하기") | ||
| String title, | ||
|
|
||
| @Schema(description = "항목 유형", example = "TIMED_ACTION") | ||
| ItemType itemType, | ||
|
|
||
| @Schema(description = "캘린더 표시 날짜", example = "2026-08-30") | ||
| LocalDate displayDate, | ||
|
|
||
| @Schema(description = "캘린더 표시 시간", example = "2026-08-30T09:00:00") | ||
| LocalDateTime displayTime, | ||
|
|
||
| @Schema(description = "항목 상태", example = "PENDING") | ||
| ActionItemStatus actionItemStatus, | ||
|
|
||
| @Schema(description = "항목 생성 주체", example = "SYSTEM") | ||
| CreatedBy createdBy, | ||
|
|
||
| @Schema(description = "완료 처리 일시. 미완료 상태이면 null", example = "2026-08-30T18:30:12") | ||
| LocalDateTime completedAt | ||
|
|
||
| ) { | ||
| public static Item from( | ||
| TimedActionItemResponse.Item item, | ||
| LocalDate parentOccurrenceDate, | ||
| Long labelId | ||
| ) { | ||
| return new Item( | ||
| item.actionItemId(), | ||
| item.parentEventId(), | ||
| parentOccurrenceDate, | ||
| item.parentEventTitle(), | ||
| labelId, | ||
| item.title(), | ||
| item.itemType(), | ||
| item.displayDate(), | ||
| item.displayTime(), | ||
| item.actionItemStatus(), | ||
| item.createdBy(), | ||
| item.completedAt() | ||
| ); | ||
| } | ||
| } | ||
| } | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Return calendar days instead of a flat item list.
The PR objective requires every date in the requested month in
days, withitems: []when a date has no items. The current flatitemslist cannot represent empty dates. Clients cannot reliably render or merge complete monthly calendar data.src/main/java/com/tryna/domain/action/dto/MonthlyTimedActionItemResponse.java#L20-L21: replace the top-level flatitemsfield withdays, where each day contains its date and item list.src/main/java/com/tryna/domain/action/service/ActionItemService.java#L597-L616: initialize all dates in the requestedYearMonth, then group mapped items into their matching day.src/test/java/com/tryna/domain/action/service/ActionItemServiceTest.java#L358-L379: assert every date is returned and unmatched dates containitems: [].src/main/java/com/tryna/domain/action/controller/docs/ActionItemControllerDocs.java#L99-L104: document thedaysresponse structure and empty-day behavior.📍 Affects 4 files
src/main/java/com/tryna/domain/action/dto/MonthlyTimedActionItemResponse.java#L20-L21(this comment)src/main/java/com/tryna/domain/action/service/ActionItemService.java#L597-L616src/test/java/com/tryna/domain/action/service/ActionItemServiceTest.java#L358-L379src/main/java/com/tryna/domain/action/controller/docs/ActionItemControllerDocs.java#L99-L104🤖 Prompt for AI Agents