Open
Conversation
Hyeon9mak
requested changes
Apr 23, 2025
Member
Hyeon9mak
left a comment
There was a problem hiding this comment.
안녕하세요 형민님! 도메인 모델링 잘 진행해주셨습니다 👍
질문주신 payments 는 기존에 구현되어 있는 pojo 객체를 그대로 활용하고,
session, course 모델링에 집중하라는 의미로 생각됩니다 😄
몇 가지 간단한 코멘트 남겼습니다.
Comment on lines
+3
to
+5
| public interface Conditional { | ||
| public boolean test(int currentNum); | ||
| } |
Member
There was a problem hiding this comment.
@FunctionalInterface 어노테이션을 명세하는 것과 하지 않는 것에는 어떤 차이가 있을까요?
Comment on lines
+12
to
+21
| private int classNo; | ||
| private Sessions sessions; | ||
|
|
||
| public int getClassNo() { | ||
| return classNo; | ||
| } | ||
|
|
||
| public Sessions getSessions() { | ||
| return this.sessions; | ||
| } |
Member
There was a problem hiding this comment.
과정(Course)은 기수 단위로 운영하며, 여러 개의 강의(Session)를 가질 수 있다.
요구사항 속 기수는 하나의 과정에서 생성되는 N 개의 강의를 나타내는 걸로 보이네요. 😄
- 과정: TDD, 클린 코드 with Java
- 강의: TDD, 클린 코드 with Java 19기
- 강의: TDD, 클린 코드 with Java 18기
- 강의: TDD, 클린 코드 with Java 17기
Comment on lines
+10
to
+12
| CoverImage(){ | ||
|
|
||
| } |
Member
There was a problem hiding this comment.
기본 생성자를 default package private 접근제한자로 만드신 이유가 있을까요?
Comment on lines
+5
to
+12
| public enum ImageType { | ||
|
|
||
| GIF("GIF"), | ||
| JPG("JPG"), | ||
| JPEG("JPEG"), | ||
| PNG("PNG"), | ||
| SVG("SVG"); | ||
|
|
Comment on lines
+22
to
+33
| public Session() { | ||
| this(new CoverImage(), LocalDate.now(), LocalDate.now()); | ||
| } | ||
|
|
||
| public Session(CoverImage coverImage, LocalDate startDt, LocalDate endDt) { | ||
| this.coverImage = coverImage; | ||
| this.startDt = startDt; | ||
| this.endDt = endDt; | ||
| this.status = SessionStatus.READY; | ||
| this.students = new ArrayList<>(); | ||
| } | ||
|
|
Comment on lines
+109
to
+111
| public boolean isNotOwner(NsUser loginUser) { | ||
| return !this.isOwner(loginUser); | ||
| } |
Comment on lines
+34
to
+43
| public void asFree() { | ||
| this.capacity = Integer.MAX_VALUE; | ||
| this.cost = BigDecimal.ZERO; | ||
| conditional = (currentNum) -> true; | ||
| } | ||
|
|
||
| public void asPaid(int capacity, BigDecimal cost) { | ||
| this.capacity = capacity; | ||
| this.cost = cost; | ||
| conditional = (currentNum) -> currentNum < this.capacity; |
Member
There was a problem hiding this comment.
처음 Session 이 생성될 때부터 유/무료가 나뉠 수 있도록 팩터리 메서드를 제공하는 것도 방법일거 같네요 😄
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.
유료 강의의 경우 결제는 이미 완료한 것으로 가정하고 이후 과정을 구현한다.
결제를 완료한 결제 정보는 payments 모듈을 통해 관리되며, 결제 정보는 Payment 객체에 담겨 반한된다.
이 내용이 무슨말인지 몰라 구현을 하진 못했습니다.