Conversation
Test Results8 tests 8 ✅ 0s ⏱️ Results for commit 42339cd. ♻️ This comment has been updated with latest results. |
jeyongsong
approved these changes
Feb 9, 2026
Comment on lines
+25
to
+37
| @PutMapping("/{date}") | ||
| fun upsertSchedule( | ||
| @Auth member: AuthMemberInfo, | ||
| @PathVariable date: LocalDate, | ||
| @RequestBody @Valid req: WorkdayUpsertRequest, | ||
| ) = ApiResponse.success(workdayService.upsertSchedule(member.id, date, req)) | ||
|
|
||
| @PatchMapping("/{date}") | ||
| fun patchClockOut( | ||
| @Auth member: AuthMemberInfo, | ||
| @PathVariable date: LocalDate, | ||
| @RequestBody @Valid req: WorkdayEditRequest, | ||
| ) = ApiResponse.success(workdayService.patchClockOut(member.id, date, req)) |
Member
There was a problem hiding this comment.
생각해보니 수정된 퇴근시간이 다음날을 넘기면 우짜지
이거 시작시간보다 끝시간이 이전이면 다음날으로 쳐야하나?
Comment on lines
+25
to
+41
| fun getSchedule(memberId: Long, date: LocalDate): WorkdayResponse { | ||
| val workSchedule = dailyWorkScheduleRepository.findByMemberIdAndDate(memberId, date) | ||
| if (workSchedule != null) { | ||
| return WorkdayResponse( | ||
| date = date, | ||
| clockInTime = workSchedule.clockInTime, | ||
| clockOutTime = workSchedule.clockOutTime, | ||
| ) | ||
| } | ||
|
|
||
| val policy = findEffectivePolicyForWorkday(memberId, date) | ||
|
|
||
| return WorkdayResponse( | ||
| date = date, | ||
| clockInTime = policy.clockInTime, | ||
| clockOutTime = policy.clockOutTime, | ||
| ) |
Member
There was a problem hiding this comment.
이거 해당 날짜에 출퇴근 기록 있으면 반환이고 없으면 정책에서 가져오는거지??
나랑 생각이 같아 구우웃
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.
This pull request introduces a new feature for managing daily work schedules, including entity creation, data access, service logic, and API endpoints. The changes allow users to retrieve, update, and patch their workday schedules, with proper validation and error handling.
Workday schedule management feature:
DailyWorkScheduleentity to represent daily work schedules, enforcing uniqueness for each member and date (src/main/kotlin/com/moa/entity/DailyWorkSchedule.kt).DailyWorkScheduleRepositoryfor accessing daily work schedules by member and date (src/main/kotlin/com/moa/repository/DailyWorkScheduleRepository.kt).WorkdayServicewith methods for retrieving, upserting, and patching workday schedules, including validation and fallback to work policy defaults if no schedule exists (src/main/kotlin/com/moa/service/WorkdayService.kt).API and DTO additions:
WorkdayControllerwith endpoints for getting, upserting, and patching daily work schedules (src/main/kotlin/com/moa/controller/WorkdayController.kt).WorkdayEditRequest,WorkdayUpsertRequest, andWorkdayResponse(src/main/kotlin/com/moa/service/dto/WorkdayEditRequest.kt,src/main/kotlin/com/moa/service/dto/WorkdayUpsertRequest.kt,src/main/kotlin/com/moa/service/dto/WorkdayResponse.kt). [1] [2] [3]Error handling improvements:
WORKDAY_NOT_FOUNDfor cases where a workday schedule cannot be found (src/main/kotlin/com/moa/common/exception/ErrorCode.kt).