diff --git a/baebae-BE/src/main/java/com/web/baebaeBE/domain/answer/dto/AnswerDetailResponse.java b/baebae-BE/src/main/java/com/web/baebaeBE/domain/answer/dto/AnswerDetailResponse.java index 209f8350..f83c5fb1 100644 --- a/baebae-BE/src/main/java/com/web/baebaeBE/domain/answer/dto/AnswerDetailResponse.java +++ b/baebae-BE/src/main/java/com/web/baebaeBE/domain/answer/dto/AnswerDetailResponse.java @@ -14,6 +14,7 @@ public class AnswerDetailResponse { private Long memberId; private String content; private String nickname; + private String senderNickname; private Boolean profileOnOff; private String linkAttachments; private String musicName; @@ -24,7 +25,7 @@ public class AnswerDetailResponse { public AnswerDetailResponse(Long answerId, Long questionId, String questionContent, Long memberId, - String content, String nickname, Boolean profileOnOff, + String content, String nickname, String senderNickname, Boolean profileOnOff, String linkAttachments, String musicName, String musicSinger, String musicAudioUrl, String imageUrl, LocalDateTime createdDate) { @@ -35,6 +36,7 @@ public AnswerDetailResponse(Long answerId, Long questionId, String questionConte this.memberId = memberId; this.content = content; this.nickname = nickname; + this.senderNickname = senderNickname; this.profileOnOff = profileOnOff; this.linkAttachments = linkAttachments; this.musicName = musicName; @@ -45,10 +47,10 @@ public AnswerDetailResponse(Long answerId, Long questionId, String questionConte } public static AnswerDetailResponse of(Long answerId, Long questionId, String questionContent, Long memberId, - String content, String nickname, Boolean profileOnOff, + String content, String nickname, String senderNickname, Boolean profileOnOff, String linkAttachments, String musicName, String musicSinger, String musicAudioUrl, String imageUrl, LocalDateTime createdDate) { - return new AnswerDetailResponse(answerId, questionId, questionContent, memberId, content, nickname, + return new AnswerDetailResponse(answerId, questionId, questionContent, memberId, content, nickname, senderNickname, profileOnOff, linkAttachments, musicName, musicSinger, musicAudioUrl, imageUrl, createdDate); diff --git a/baebae-BE/src/main/java/com/web/baebaeBE/domain/answer/repository/AnswerMapper.java b/baebae-BE/src/main/java/com/web/baebaeBE/domain/answer/repository/AnswerMapper.java index 6e1ce10d..cd65bd9f 100644 --- a/baebae-BE/src/main/java/com/web/baebaeBE/domain/answer/repository/AnswerMapper.java +++ b/baebae-BE/src/main/java/com/web/baebaeBE/domain/answer/repository/AnswerMapper.java @@ -57,6 +57,7 @@ public AnswerDetailResponse toDomain(Answer answer) { member.getId(), answer.getContent(), answer.getNickname(), + question.getSender().getNickname(), answer.isProfileOnOff(), answer.getLinkAttachments(), music != null ? music.getMusicName() : null,