Skip to content

Commit

Permalink
과제 응답에 type 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
wjdwlghks committed May 13, 2024
1 parent 762295e commit 0c08aa8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.project.capstone.assignment.controller.dto;

import com.project.capstone.assignment.domain.Assignment;
import com.project.capstone.assignment.domain.AssignmentType;
import com.project.capstone.content.controller.dto.ContentResponse;
import com.project.capstone.content.domain.Content;
import com.project.capstone.quiz.controller.dto.QuizResponse;
Expand All @@ -12,13 +13,14 @@
public record AssignmentResponse(
Long id,
String name,
AssignmentType type,
String startDate,
String endDate,
List<ContentResponse> contentList,
List<QuizResponse> quizList
) {
public AssignmentResponse(Assignment assignment) {
this(assignment.getId(), assignment.getName(), assignment.getStartDate(),
this(assignment.getId(), assignment.getName(), assignment.getAssignmentType(), assignment.getStartDate(),
assignment.getEndDate(), createContentList(assignment.getContents()), createQuizList(assignment.getQuizzes()));
}

Expand Down

0 comments on commit 0c08aa8

Please sign in to comment.