Feat/일정과 작업 분리#21
Merged
Hidden character warning
The head ref may contain hidden characters: "feat/\uc77c\uc815\uacfc-\uc791\uc5c5-\ubd84\ub9ac"
Merged
Conversation
# Conflicts: # src/main/java/me/gg/pinit/pinittask/domain/schedule/model/Schedule.java # src/main/java/me/gg/pinit/pinittask/domain/schedule/patch/SchedulePatch.java # src/test/java/me/gg/pinit/pinittask/domain/task/vo/ImportanceConstraintTest.java
- V0 (레거시) 전용
Contributor
There was a problem hiding this comment.
Pull request overview
이 PR은 기존에 결합되어 있던 Schedule과 Task를 분리하는 대규모 리팩토링입니다. Task는 마감일이 있는 "작업" 자체를 관리하고, Schedule은 특정 시간대에 실행되는 "일정"을 관리하도록 역할이 명확히 분리되었습니다.
Changes:
- Task와 Schedule 도메인 분리: 기존 Schedule에 포함되어 있던 작업 속성(마감일, 중요도, 난이도, TaskType)을 Task 도메인으로 이동
- API 버전 분리: V0(레거시, Task+Schedule 통합), V1(Task와 Schedule 독립 관리)
- 의존 관계 변경: Schedule 간 의존성에서 Task 간 의존성으로 변경
- 이벤트 추가: TaskCompletedEvent, TaskCanceledEvent 신규 추가
- 데이터 연동: Task↔Schedule 간 1:1 관계 설정 및 상태 동기화 로직 추가
Reviewed changes
Copilot reviewed 80 out of 80 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| README.md | 도메인 개요 업데이트 (Task/Schedule 분리 설명) |
| async-api.yaml | Task 완료/취소 이벤트 채널 추가 |
| TaskControllerV1.java | 새로운 Task 관리 API 엔드포인트 |
| ScheduleControllerV1.java | Task 없이 독립적인 Schedule 관리 API |
| ScheduleControllerV0.java | 레거시 호환성 유지 (Task+Schedule 통합) |
| Task.java | 새로운 Task 도메인 모델 |
| Schedule.java | Task 관련 속성 제거, taskId 참조 추가 |
| Dependency.java | ownerId 필수화, Task ID 기반 의존성 |
| TaskService.java | Task CRUD 및 상태 관리 서비스 |
| ScheduleService.java | Schedule CRUD 및 Task 연동 로직 |
| DependencyService.java | Task 기반 의존성 관리 및 inboundCount 업데이트 |
| 테스트 파일들 | 도메인 분리에 따른 테스트 업데이트 |
|
|
||
| @Test | ||
| void deleteTask_throwsWhenOwnerDoesNotMatch() { | ||
| Long ownerId = 3L; |
There was a problem hiding this comment.
The variable 'ownerId' is only assigned values of primitive type and is never 'null', but it is declared with the boxed type 'Long'.
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.
작업(Task)과 일정(Schedule)의 분리 필요성
작업
일정
일정은 반드시 작업과 연결될 필요는 없음
작업은 사용자의 원함에 의해, 일정으로 복사될 수 있음
변경된 점
Task와 Schedule의 도메인 상태 분리
Task
Schedule
둘 사이의 도메인 로직 설정
일정 삭제 시 연결된 작업 삭제 금지
ScheduleControllerAdvice에 Task 예외가 처리되고 있음
작업의 조회 방식
작업 조회 페이지네이션
Task - Schedule