From 875d3d14f4d6e2a59a5925b9010edaf73ed9ff19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8C=E1=85=A5=E1=86=BC=E1=84=83=E1=85=AE=E1=84=8B?= =?UTF-8?q?=E1=85=AF=E1=86=AB?= Date: Mon, 20 Nov 2023 17:51:10 +0900 Subject: [PATCH] Feat : answer list into each video in material 4 pdf api --- .../com/m9d/sroom/material/MaterialService.java | 5 ++++- .../material/dto/response/Answer4PdfResponse.java | 14 +++++++++++--- .../dto/response/VideoAnswer4PdfResponse.java | 15 +++++++++++++++ 3 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 src/main/java/com/m9d/sroom/material/dto/response/VideoAnswer4PdfResponse.java diff --git a/src/main/java/com/m9d/sroom/material/MaterialService.java b/src/main/java/com/m9d/sroom/material/MaterialService.java index c3e497d8..7cf4c51f 100644 --- a/src/main/java/com/m9d/sroom/material/MaterialService.java +++ b/src/main/java/com/m9d/sroom/material/MaterialService.java @@ -145,12 +145,15 @@ private void addMaterialAndQuizAnswer(CourseVideo courseVideo, List videoAnswers; + + public static Answer4PdfResponse getDefault(int videoIndex, String title) { + return new Answer4PdfResponse(videoIndex, title, new ArrayList<>()); + } } diff --git a/src/main/java/com/m9d/sroom/material/dto/response/VideoAnswer4PdfResponse.java b/src/main/java/com/m9d/sroom/material/dto/response/VideoAnswer4PdfResponse.java new file mode 100644 index 00000000..c55dde63 --- /dev/null +++ b/src/main/java/com/m9d/sroom/material/dto/response/VideoAnswer4PdfResponse.java @@ -0,0 +1,15 @@ +package com.m9d.sroom.material.dto.response; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; + +@Data +@Builder +@AllArgsConstructor +public class VideoAnswer4PdfResponse { + + private int quizIndex; + private String answer; + private String answerStr; +}