Skip to content

Commit

Permalink
Merge pull request #89 from Team-baebae/feature/question/#34
Browse files Browse the repository at this point in the history
chore: senderNickname으로 수정
  • Loading branch information
jihyo-j authored May 18, 2024
2 parents e29a2c9 + 0b26647 commit 9aec016
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 @@ -11,21 +11,21 @@ public class QuestionDetailResponse {
private Long questionId;
private String content;
private String nickname;
private String memberNickname;
private String senderNickname;
private Boolean profileOnOff;
private LocalDateTime createdDate;
private Boolean isAnswered;

public QuestionDetailResponse(Long questionId, String content, String nickname, String memberNickname, Boolean profileOnOff, LocalDateTime createdDate, Boolean isAnswered) {
public QuestionDetailResponse(Long questionId, String content, String nickname, String senderNickname, Boolean profileOnOff, LocalDateTime createdDate, Boolean isAnswered) {
this.questionId = questionId;
this.content = content;
this.nickname = nickname;
this.memberNickname = memberNickname;
this.senderNickname = senderNickname;
this.profileOnOff = profileOnOff;
this.createdDate = createdDate;
this.isAnswered = isAnswered;
}
public static QuestionDetailResponse of(Long questionId, String content, String nickname, String memberNickname, Boolean profileOnOff, LocalDateTime createdDate, Boolean isAnswered) {
return new QuestionDetailResponse(questionId, content, nickname, memberNickname, profileOnOff, createdDate, isAnswered);
public static QuestionDetailResponse of(Long questionId, String content, String nickname, String senderNickname, Boolean profileOnOff, LocalDateTime createdDate, Boolean isAnswered) {
return new QuestionDetailResponse(questionId, content, nickname, senderNickname, profileOnOff, createdDate, isAnswered);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ public Question toEntity(QuestionCreateRequest request, Member sender, Member re
}

public QuestionDetailResponse toDomain(Question question) {
Member member = question.getReceiver();
Member sender = question.getSender();
return QuestionDetailResponse.of(
question.getId(),
question.getContent(),
question.getNickname(),
member.getNickname(),
sender.getNickname(),
question.getProfileOnOff(),
question.getCreatedDate(),
question.isAnswered()
Expand Down

0 comments on commit 9aec016

Please sign in to comment.