Skip to content

Commit

Permalink
refactor: Assignment 정적 팩토리 이름 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
uwoobeat committed Oct 15, 2024
1 parent 086d284 commit 3f0edc1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,20 @@ public static StudyDetail createStudyDetail(Study study, Long week, String atten
.attendanceNumber(attendanceNumber)
.period(period)
.curriculum(Curriculum.createEmpty())
.assignment(Assignment.createEmpty())
.assignment(Assignment.empty())
.build();
}

public void cancelAssignment() {
assignment = Assignment.createCanceled();
assignment = Assignment.canceled();
}

public void publishAssignment(String title, LocalDateTime deadLine, String descriptionNotionLink) {
assignment = Assignment.create(title, deadLine, descriptionNotionLink);
assignment = Assignment.of(title, deadLine, descriptionNotionLink);
}

public void updateAssignment(String title, LocalDateTime deadLine, String descriptionNotionLink) {
assignment = Assignment.create(title, deadLine, descriptionNotionLink);
assignment = Assignment.of(title, deadLine, descriptionNotionLink);
}

// 데이터 전달 로직
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private Assignment(String title, LocalDateTime deadline, String descriptionLink,
this.status = status;
}

public static Assignment create(String title, LocalDateTime deadline, String descriptionLink) {
public static Assignment of(String title, LocalDateTime deadline, String descriptionLink) {
return Assignment.builder()
.title(title)
.deadline(deadline)
Expand All @@ -55,11 +55,11 @@ public static Assignment create(String title, LocalDateTime deadline, String des
.build();
}

public static Assignment createEmpty() {
public static Assignment empty() {
return Assignment.builder().status(NONE).build();
}

public static Assignment createCanceled() {
public static Assignment canceled() {
return Assignment.builder().status(CANCELLED).build();
}

Expand Down

0 comments on commit 3f0edc1

Please sign in to comment.