Skip to content

Commit

Permalink
feat() : 질물게시판 생성날짜, 수정날짜 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
dongkyun0713 committed Feb 25, 2024
1 parent 33cd279 commit adfdd99
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ public static class Response {
@Schema(description = "조회수")
private Integer viewCount;

@Schema(description = "생성 날짜")
private LocalDateTime createDate;

@Schema(description = "수정 날짜")
private LocalDateTime updateDate;

public Response(Question question) {
this.id = question.getId();
this.authorId = question.getAuthor().getId();
Expand All @@ -98,6 +104,8 @@ public Response(Question question) {
this.answerList = question.getAnswers().stream().map(AnswerDTO.Response::new).toList();
this.isAccepted = question.getAcceptedAnswer() != null;
this.viewCount = question.getViewCount();
this.createDate = question.getCreateDate();
this.updateDate = question.getUpdateDate();
}
}

Expand Down

0 comments on commit adfdd99

Please sign in to comment.