Skip to content

Commit

Permalink
refactor: 참고 링크를 응답 데이터에 포함시키도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeHongDev committed Jul 8, 2024
1 parent 3d76018 commit 7981e7e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public record InterviewQuestionDetail(
AnswerState answerState,
String question,
String answer,
String referenceLinks,
List<String> referenceLinks,
String feedback,
int score,
int remainTailQuestionCount,
Expand Down Expand Up @@ -71,7 +71,8 @@ public record TailQuestionDetail(
int score,
String question,
String answer,
String feedback
String feedback,
List<String> referenceLinks
) {
public static TailQuestionDetail from(TailQuestionEntity tailQuestion) {
return TailQuestionDetail.builder()
Expand All @@ -81,6 +82,7 @@ public static TailQuestionDetail from(TailQuestionEntity tailQuestion) {
.answer(tailQuestion.getAnswer())
.feedback(tailQuestion.getFeedback())
.score(tailQuestion.getScore())
.referenceLinks(tailQuestion.getReferenceLinks())
.build();

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import java.util.List;
import java.util.Optional;
import lombok.AccessLevel;
import lombok.Builder;
Expand Down Expand Up @@ -133,8 +134,8 @@ public AnswerState getAnswerState() {
return answer.getAnswerState();
}

public String getReferenceLinks() {
return "";
public List<String> getReferenceLinks() {
return aiFeedback.getReferenceLinks();
}

public String getFeedback() {
Expand All @@ -148,5 +149,6 @@ public String getAnswer() {
public int getScore() {
return aiFeedback.getScore();
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import java.util.List;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
Expand Down Expand Up @@ -96,4 +97,8 @@ public AnswerState getAnswerState() {
public int getScore() {
return aiFeedback.getScore();
}

public List<String> getReferenceLinks() {
return aiFeedback.getReferenceLinks();
}
}

0 comments on commit 7981e7e

Please sign in to comment.