Skip to content

feat/KD-41-domain Schedule 도메인 엔티티 설계#277

Merged
dkdltm221 merged 6 commits intodevelopfrom
feature/KD-41-domain
Nov 10, 2025
Merged

feat/KD-41-domain Schedule 도메인 엔티티 설계#277
dkdltm221 merged 6 commits intodevelopfrom
feature/KD-41-domain

Conversation

@dkdltm221
Copy link
Copy Markdown
Contributor

Summary

해당 PR에 대한 요약을 작성해주세요.
Schedule 도메인 엔티티 설계하고 서비스 기능을 구현했습니다.

Tasks

  • Schedule 도메인,엔티티 설계
  • Schedule Repository 및 Service구현

@dkdltm221 dkdltm221 self-assigned this Nov 6, 2025
@dkdltm221 dkdltm221 added the ✨feature create new feature label Nov 6, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 6, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

새로운 Schedule 도메인 모듈을 추가하여 스케줄 관리 기능을 구현합니다. 엔티티, 리포지토리, 커맨드/쿼리 서비스, 예외 처리 및 JPA 인프라 계층으로 구성된 완전한 도메인 구조를 포함합니다.

Changes

Cohort / File(s) Summary
Domain Model
aics-domain/src/main/java/kgu/developers/domain/schedule/domain/Schedule.java, SubmissionType.java, ScheduleStatus.java
Schedule 엔티티 생성, SubmissionType 및 ScheduleStatus 열거형 추가. Schedule은 정적 팩토리 메서드 create, 상태 조회 메서드 statusAt, 필드 업데이트 메서드들을 제공합니다.
Repository Contract
aics-domain/src/main/java/kgu/developers/domain/schedule/domain/ScheduleRepository.java
Schedule 엔티티의 CRUD 및 조회 계약을 정의하는 리포지토리 인터페이스 추가.
Repository Implementation
aics-domain/src/main/java/kgu/developers/domain/schedule/infrastructure/ScheduleRepositoryImpl.java, JpaScheduleRepository.java, ScheduleJpaEntity.java
Spring Data JPA 기반 리포지토리 구현. ScheduleJpaEntity는 "schedule" 테이블에 매핑되며 submission_type 컬럼에 유니크 제약이 있습니다.
Service Layer
aics-domain/src/main/java/kgu/developers/domain/schedule/application/command/ScheduleService.java, query/ScheduleQueryService.java
커맨드 서비스는 생성/업데이트/삭제 기능을, 쿼리 서비스는 조회 기능을 제공합니다.
Exception Handling
aics-domain/src/main/java/kgu/developers/domain/schedule/exception/ScheduleDomainExceptionCode.java, DuplicateScheduleTypeException.java, ScheduleNotFoundException.java
도메인 예외 코드 정의 및 관련 예외 클래스 추가.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • ScheduleJpaEntity: 엔티티 매핑, BaseTimeEntity 상속, 도메인 변환 로직 (toDomain/toEntity) 검증 필요
  • ScheduleRepositoryImpl: 도메인-JPA 엔티티 변환 및 Optional 처리 로직 검토
  • ScheduleService.createSchedule: 중복 검증 로직 및 예외 처리 (DuplicateRequestException 참고 - 명칭 불일치 가능성 주의)
  • ScheduleRepository 메서드명: findBySubmissionTyp 메서드명의 오타 가능성 (Typ → Type) 전체 추적 필요

Possibly related issues

Suggested reviewers

  • LeeHanEum
  • JangYeongHu

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed PR 설명이 Schedule 도메인 엔티티 설계 및 서비스 기능 구현과 관련된 내용을 포함하고 있어 변경 사항과 부합합니다.
Title check ✅ Passed PR 제목은 Schedule 도메인 엔티티 설계라는 변경사항의 핵심을 명확하게 설명하고 있으며, 추가된 모든 파일들(엔티티, 리포지토리, 서비스, 예외처리)이 이 목표에 부합합니다.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 6, 2025

Test Coverage Report

Overall Project 85.28% -9.47% 🍏
Files changed 0%

Module Coverage
aics-domain 78.82% -13.67%
Files
Module File Coverage
aics-domain ScheduleQueryService.java 0%
Schedule.java 0%
ScheduleStatus.java 0%
SubmissionType.java 0%
ScheduleService.java 0%

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 6, 2025

Codecov Report

❌ Patch coverage is 0% with 53 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...gu/developers/domain/schedule/domain/Schedule.java 0.00% 21 Missing ⚠️
.../schedule/application/command/ScheduleService.java 0.00% 15 Missing ⚠️
...elopers/domain/schedule/domain/SubmissionType.java 0.00% 7 Missing ⚠️
...hedule/application/query/ScheduleQueryService.java 0.00% 6 Missing ⚠️
...elopers/domain/schedule/domain/ScheduleStatus.java 0.00% 4 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (10.00%). You can increase the patch coverage or adjust the target coverage.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #277      +/-   ##
=============================================
- Coverage      92.81%   83.70%   -9.11%     
  Complexity       164      164              
=============================================
  Files             50       55       +5     
  Lines            487      540      +53     
  Branches           4        5       +1     
=============================================
  Hits             452      452              
- Misses            29       82      +53     
  Partials           6        6              
Files with missing lines Coverage Δ Complexity Δ
...elopers/domain/schedule/domain/ScheduleStatus.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...hedule/application/query/ScheduleQueryService.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...elopers/domain/schedule/domain/SubmissionType.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
.../schedule/application/command/ScheduleService.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...gu/developers/domain/schedule/domain/Schedule.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8cc5c42...8039777. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
aics-domain/src/main/java/kgu/developers/domain/schedule/domain/ScheduleRepository.java (1)

11-11: findBySubmissionTyp 메서드명 오타 수정 권장

신규 인터페이스 공개 API에 오타가 남으면 이후 전반에 걸쳐 오용될 가능성이 커집니다. 지금 단계에서 findBySubmissionType으로 정정하고 구현체 및 서비스 계층 호출부도 함께 맞춰 주세요.

아래 패치를 적용해 주세요:

-    Optional<Schedule> findBySubmissionTyp(SubmissionType submissionType);
+    Optional<Schedule> findBySubmissionType(SubmissionType submissionType);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 374c7c0 and 3a8fe13.

📒 Files selected for processing (12)
  • aics-domain/src/main/java/kgu/developers/domain/schedule/application/command/ScheduleService.java (1 hunks)
  • aics-domain/src/main/java/kgu/developers/domain/schedule/application/query/ScheduleQueryService.java (1 hunks)
  • aics-domain/src/main/java/kgu/developers/domain/schedule/domain/Schedule.java (1 hunks)
  • aics-domain/src/main/java/kgu/developers/domain/schedule/domain/ScheduleRepository.java (1 hunks)
  • aics-domain/src/main/java/kgu/developers/domain/schedule/domain/ScheduleStatus.java (1 hunks)
  • aics-domain/src/main/java/kgu/developers/domain/schedule/domain/SubmissionType.java (1 hunks)
  • aics-domain/src/main/java/kgu/developers/domain/schedule/exception/DuplicateScheduleTypeException.java (1 hunks)
  • aics-domain/src/main/java/kgu/developers/domain/schedule/exception/ScheduleDomainExceptionCode.java (1 hunks)
  • aics-domain/src/main/java/kgu/developers/domain/schedule/exception/ScheduleNotFoundException.java (1 hunks)
  • aics-domain/src/main/java/kgu/developers/domain/schedule/infrastructure/JpaScheduleRepository.java (1 hunks)
  • aics-domain/src/main/java/kgu/developers/domain/schedule/infrastructure/ScheduleJpaEntity.java (1 hunks)
  • aics-domain/src/main/java/kgu/developers/domain/schedule/infrastructure/ScheduleRepositoryImpl.java (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (5)
aics-domain/src/main/java/kgu/developers/domain/schedule/application/query/ScheduleQueryService.java (2)
aics-domain/src/main/java/kgu/developers/domain/schedule/exception/ScheduleNotFoundException.java (1)
  • ScheduleNotFoundException (7-9)
aics-domain/src/main/java/kgu/developers/domain/schedule/application/command/ScheduleService.java (1)
  • Service (13-44)
aics-domain/src/main/java/kgu/developers/domain/schedule/infrastructure/ScheduleJpaEntity.java (1)
aics-domain/src/main/java/kgu/developers/domain/schedule/domain/Schedule.java (1)
  • Getter (10-60)
aics-domain/src/main/java/kgu/developers/domain/schedule/application/command/ScheduleService.java (1)
aics-domain/src/main/java/kgu/developers/domain/schedule/application/query/ScheduleQueryService.java (1)
  • Service (12-30)
aics-domain/src/main/java/kgu/developers/domain/schedule/domain/ScheduleStatus.java (1)
aics-domain/src/main/java/kgu/developers/domain/schedule/domain/Schedule.java (1)
  • Getter (10-60)
aics-domain/src/main/java/kgu/developers/domain/schedule/domain/SubmissionType.java (1)
aics-domain/src/main/java/kgu/developers/domain/schedule/domain/Schedule.java (1)
  • Getter (10-60)
🔇 Additional comments (5)
aics-domain/src/main/java/kgu/developers/domain/schedule/exception/DuplicateScheduleTypeException.java (1)

7-9: 도메인 예외 코드 매핑이 일관적입니다. CustomException 계층에서 사용하는 코드 위임 패턴을 그대로 따르고 있어 추가 수정이 필요 없어 보입니다.

aics-domain/src/main/java/kgu/developers/domain/schedule/exception/ScheduleNotFoundException.java (1)

7-9: 조회 실패 예외 정의가 명확합니다. SCHEDULE_MANAGEMENT_NOT_FOUND 코드를 그대로 위임하여 도메인 전반의 에러 처리 방식과 잘 맞습니다.

aics-domain/src/main/java/kgu/developers/domain/schedule/infrastructure/JpaScheduleRepository.java (1)

8-10: 파생 쿼리 선언이 적절합니다. SubmissionType을 기반으로 Optional 조회를 노출하여 서비스 계층에서 중복 여부나 존재 여부를 명확히 분기할 수 있겠습니다.

aics-domain/src/main/java/kgu/developers/domain/schedule/domain/SubmissionType.java (1)

6-17: 라벨 포함 enum 구성이 깔끔합니다. @requiredargsconstructor@Getter 조합으로 한글 라벨을 안전하게 노출할 수 있어 유지보수가 수월해 보입니다.

aics-domain/src/main/java/kgu/developers/domain/schedule/domain/ScheduleStatus.java (1)

6-14: 상태 enum 정의가 Schedule.statusAt과 잘 호응합니다. 각 상태에 한글 라벨을 부여해 표현 계층에서도 재사용하기 좋겠습니다.

@dkdltm221 dkdltm221 changed the title feat/KD-41 Schedule 도메인 엔티티 설계 feat/KD-41-domain Schedule 도메인 엔티티 설계 Nov 7, 2025
Copy link
Copy Markdown
Contributor

@JangYeongHu JangYeongHu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다! 남긴 리뷰 한번씩 확인 부탁드려요

그리고 앞으로 entity와 repository도 패키지를 한번 나눠주는 편이 좋을 것 같아요

Comment thread aics-domain/src/main/java/kgu/developers/domain/schedule/domain/Schedule.java Outdated
…SubmissionTyp 오타 수정 , entity,repository 패키지 생성하여 분리 작업
Copy link
Copy Markdown
Member

@LeeHanEum LeeHanEum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR에 DDL도 같이 올려주면 좋을거 같아요~
LGTM👍

Copy link
Copy Markdown
Contributor

@JangYeongHu JangYeongHu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~ 수고하셨습니다

@JangYeongHu
Copy link
Copy Markdown
Contributor

ddl 추가해주신것도 확인 했습니다! 따로 이슈는 없어 보이네요

@dkdltm221 dkdltm221 linked an issue Nov 10, 2025 that may be closed by this pull request
2 tasks
@dkdltm221 dkdltm221 merged commit 4835cb1 into develop Nov 10, 2025
4 of 5 checks passed
@dkdltm221 dkdltm221 deleted the feature/KD-41-domain branch November 10, 2025 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨feature create new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Schedule 도메인 및 엔티티 설계

3 participants