Skip to content

Commit

Permalink
refactor #45: 편의 메서드 제거 및 필드 명 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
GiHoo committed Apr 28, 2024
1 parent a50dfac commit fe4cb17
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.ArrayList;
import java.util.List;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

Expand All @@ -35,23 +36,18 @@ public class SolveHistory {
private Long solveCount;

@OneToMany(mappedBy = "solveHistory")
private List<SolveHistoryDetail> solveHistoryDetail = new ArrayList<>();
private List<SolveHistoryDetail> solveHistoryDetails = new ArrayList<>();

private ProblemType problemType;

private LocalDateTime solveDate;

@Builder
public SolveHistory(Member member, Long solveCount, ProblemType problemType,
LocalDateTime solveDate, List<SolveHistoryDetail> solveHistoryDetail) {
LocalDateTime solveDate) {
this.member = member;
this.solveCount = solveCount;
this.problemType = problemType;
this.solveDate = solveDate;
this.solveHistoryDetail = solveHistoryDetail;
}

public void addSolveHistoryDetail(SolveHistoryDetail solveHistoryDetail) {
this.solveHistoryDetail.add(solveHistoryDetail);
solveHistoryDetail.setSolveHistory(this);
}
}

0 comments on commit fe4cb17

Please sign in to comment.