-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#56] refactor: 요청 사항 command에 모아서 내려주도록 변경
- Loading branch information
1 parent
dd73ebf
commit f8b84e1
Showing
6 changed files
with
33 additions
and
31 deletions.
There are no files selected for viewing
6 changes: 5 additions & 1 deletion
6
...ore/src/main/java/org/nexters/jaknaesocore/domain/survey/dto/SurveySubmissionCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
package org.nexters.jaknaesocore.domain.survey.dto; | ||
|
||
public record SurveySubmissionCommand(Long optionId, String comment) {} | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record SurveySubmissionCommand( | ||
Long optionId, Long surveyId, Long memberId, String comment) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 1 addition & 6 deletions
7
...java/org/nexters/jaknaesoserver/domain/survey/controller/dto/SurveySubmissionRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
package org.nexters.jaknaesoserver.domain.survey.controller.dto; | ||
|
||
import jakarta.validation.constraints.NotNull; | ||
import org.nexters.jaknaesocore.domain.survey.dto.SurveySubmissionCommand; | ||
|
||
public record SurveySubmissionRequest(@NotNull Long optionId, String comment) { | ||
public SurveySubmissionCommand toServiceRequest() { | ||
return new SurveySubmissionCommand(optionId(), comment()); | ||
} | ||
} | ||
public record SurveySubmissionRequest(@NotNull Long optionId, String comment) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters