Skip to content

Commit

Permalink
Merge pull request #73 from kookmin-sw/BE_Refactor
Browse files Browse the repository at this point in the history
과제 응답에 type 추가
  • Loading branch information
wjdwlghks authored May 13, 2024
2 parents 4edad0e + 0c08aa8 commit c9cd83f
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 c9cd83f

Please sign in to comment.