diff --git a/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/AnswerByPersonGetResponse.java b/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/AnswerByPersonGetResponse.java index 1589b0cf..fc7b3b0d 100644 --- a/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/AnswerByPersonGetResponse.java +++ b/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/AnswerByPersonGetResponse.java @@ -2,8 +2,13 @@ import java.util.List; +import io.swagger.v3.oas.annotations.media.Schema; + +@Schema(name = "AnswerByPersonGetResponse", description = "개인별 답변 조회 응답 Dto") public record AnswerByPersonGetResponse( + @Schema(description = "답변자", example = "홍길동") String name, + @Schema(description = "질문-답변 객체", example = "") List answers ) { } diff --git a/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/AnswerByQuestionGetResponse.java b/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/AnswerByQuestionGetResponse.java index fce3050e..be6540f8 100644 --- a/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/AnswerByQuestionGetResponse.java +++ b/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/AnswerByQuestionGetResponse.java @@ -2,9 +2,15 @@ import java.util.List; +import io.swagger.v3.oas.annotations.media.Schema; + +@Schema(name = "AnswerByQuestionGetResponse", description = "임시 회고 조회 응답 Dto") public record AnswerByQuestionGetResponse( + @Schema(description = "질문 내용", example = "질문 내용입니당") String questionContent, + @Schema(description = "질문 타입", example = "plain_text") String questionType, + @Schema(description = "질문 객체", example = "") List answers ) { } diff --git a/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/AnswerListGetResponse.java b/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/AnswerListGetResponse.java index a7bac720..0feba21f 100644 --- a/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/AnswerListGetResponse.java +++ b/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/AnswerListGetResponse.java @@ -2,8 +2,13 @@ import java.util.List; +import io.swagger.v3.oas.annotations.media.Schema; + +@Schema(name = "AnswerListGetResponse", description = "회고 결과 조회 응답 Dto") public record AnswerListGetResponse( + @Schema(description = "질문 기준 결과", example = "") List questions, + @Schema(description = "개별 기준 결과", example = "") List individuals ) { } diff --git a/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/PersonAndAnswerGetResponse.java b/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/PersonAndAnswerGetResponse.java index 7a75e2cf..7de6a59f 100644 --- a/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/PersonAndAnswerGetResponse.java +++ b/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/PersonAndAnswerGetResponse.java @@ -1,7 +1,12 @@ package org.layer.domain.answer.controller.dto.response; +import io.swagger.v3.oas.annotations.media.Schema; + +@Schema(name = "PersonAndAnswerGetResponse", description = "개인-답변 응답 Dto") public record PersonAndAnswerGetResponse( + @Schema(description = "답변자", example = "홍길동") String name, + @Schema(description = "답변 내용", example = "답변 내용입니당") String answerContent ) { } diff --git a/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/QuestionAndAnswerGetResponse.java b/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/QuestionAndAnswerGetResponse.java index 5df8a6d3..f6087d93 100644 --- a/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/QuestionAndAnswerGetResponse.java +++ b/layer-api/src/main/java/org/layer/domain/answer/controller/dto/response/QuestionAndAnswerGetResponse.java @@ -1,8 +1,14 @@ package org.layer.domain.answer.controller.dto.response; +import io.swagger.v3.oas.annotations.media.Schema; + +@Schema(name = "QuestionAndAnswerGetResponse", description = "질문-답변 Dto") public record QuestionAndAnswerGetResponse( + @Schema(description = "질문 내용", example = "질문 내용입니다.") String questionContent, + @Schema(description = "질문 타입", example = "plain_text") String questionType, + @Schema(description = "답변 내용", example = "답변 내용입니다.") String answerContent ) { } diff --git a/layer-api/src/main/java/org/layer/domain/retrospect/service/RetrospectService.java b/layer-api/src/main/java/org/layer/domain/retrospect/service/RetrospectService.java index 1a93f9c1..0a25de52 100644 --- a/layer-api/src/main/java/org/layer/domain/retrospect/service/RetrospectService.java +++ b/layer-api/src/main/java/org/layer/domain/retrospect/service/RetrospectService.java @@ -7,6 +7,7 @@ import org.layer.domain.common.time.Time; import org.layer.domain.form.entity.Form; import org.layer.domain.form.entity.FormType; +import org.layer.domain.form.enums.FormTag; import org.layer.domain.form.repository.FormRepository; import org.layer.domain.question.entity.Question; import org.layer.domain.question.enums.QuestionOwner; @@ -64,9 +65,8 @@ public Long createRetrospect(RetrospectCreateRequest request, Long spaceId, Long // 새로운 폼 생성(수정)인지 확인 if (request.isNewForm()) { // 내 회고 폼에 추가 - Form baseForm = formRepository.findByIdOrThrow(request.curFormId()); Form form = new Form(memberId, spaceId, request.title(), request.introduction(), FormType.CUSTOM, - baseForm.getFormTag()); + FormTag.CUSTOM); Form savedForm = formRepository.save(form); List myQuestions = getQuestions(request.questions(), null, savedForm.getId()); diff --git a/layer-domain/src/main/java/org/layer/domain/form/enums/FormTag.java b/layer-domain/src/main/java/org/layer/domain/form/enums/FormTag.java index 2f71c8a5..10e6ef21 100644 --- a/layer-domain/src/main/java/org/layer/domain/form/enums/FormTag.java +++ b/layer-domain/src/main/java/org/layer/domain/form/enums/FormTag.java @@ -11,7 +11,8 @@ public enum FormTag { MAD_SAD_GLAD("Mad Sad Glad"), SSC("SSC"), PMI("PMI"), - UNTITLED("무제"); + UNTITLED("무제"), + CUSTOM("CUSTOM"); private final String tag; }