Skip to content

Commit

Permalink
Merge pull request #126 from 22caps/dev
Browse files Browse the repository at this point in the history
dev -> main
  • Loading branch information
GiHoo authored Nov 19, 2024
2 parents 600ad68 + eb0c6f5 commit 2d890c1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 46 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import java.time.LocalDateTime;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
Expand All @@ -36,10 +37,13 @@ public class PluginSolveHistory {

private boolean isCorrect;

private LocalDateTime solveDate;

@Builder
public PluginSolveHistory(Member member, ProblemType problemType, boolean isCorrect) {
this.member = member;
this.problemType = problemType;
this.isCorrect = isCorrect;
this.solveDate = LocalDateTime.now();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ public class SolveHistory {
private boolean isReviewed;

@Builder
public SolveHistory(Member member, ProblemType problemType, LocalDateTime solveDate) {
public SolveHistory(Member member, ProblemType problemType) {
this.member = member;
this.problemType = problemType;
this.solveDate = solveDate;
this.solveDate = LocalDateTime.now();
this.correctRate = 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public SolveHistorySetUpResponseDto setSolveHistory(SolveHistorySetUpRequestDto
ProblemType problemType = ProblemType.valueOf(request.getProblemType());

SolveHistory solveHistory = solveHistoryRepository.save(
new SolveHistory(member, problemType, LocalDateTime.now())
new SolveHistory(member, problemType)
); // SolveHistory 생성

return SolveHistorySetUpResponseDto.of(solveHistory.getId(), request.getProblemCount());
Expand All @@ -64,8 +64,7 @@ public SolveHistorySetUpResponseDto setSolveHistoryWithEmail(
Member member = memberService.findByEmail(request.getEmail()).orElseThrow();

SolveHistory solveHistory = solveHistoryRepository.save(
new SolveHistory(member, ProblemType.valueOf(request.getProblemType()),
LocalDateTime.now())
new SolveHistory(member, ProblemType.valueOf(request.getProblemType()))
); // SolveHistory 생성

return SolveHistorySetUpResponseDto.of(solveHistory.getId(), request.getProblemCount());
Expand Down

0 comments on commit 2d890c1

Please sign in to comment.