Skip to content

Commit

Permalink
feat : 풀이 조회 DTO에 문제 제목 및 레벨 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
rladmstn committed Nov 8, 2024
1 parent 19588e8 commit e2c829e
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

@Builder
public record GetSolutionResponse(Long solutionId,
String problemTitle,
Integer problemLevel,
String nickname,
String profileImage,
String solvedDateTime,
Expand All @@ -22,6 +24,8 @@ public record GetSolutionResponse(Long solutionId,
public static GetSolutionResponse toDTO(Solution solution, Long commentCount) {
return GetSolutionResponse.builder()
.solutionId(solution.getId())
.problemTitle(solution.getProblem().getTitle())
.problemLevel(solution.getProblem().getLevel())
.nickname(solution.getUser().getNickname())
.profileImage(solution.getUser().getProfileImage())
.solvedDateTime(DateFormatUtil.formatDateTime(solution.getSolvedDateTime()))
Expand Down

0 comments on commit e2c829e

Please sign in to comment.