-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from MARU-EGG/refactor/유사도-효율-증가
[TSK-45] refactor: 유사도 효율 증가를 위한 구조 개선
- Loading branch information
Showing
10 changed files
with
201 additions
and
131 deletions.
There are no files selected for viewing
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
24 changes: 24 additions & 0 deletions
24
src/main/java/mju/iphak/maru_egg/question/dao/request/SelectQuestionCores.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package mju.iphak.maru_egg.question.dao.request; | ||
|
||
import lombok.Builder; | ||
import mju.iphak.maru_egg.question.domain.QuestionCategory; | ||
import mju.iphak.maru_egg.question.domain.QuestionType; | ||
|
||
@Builder | ||
public record SelectQuestionCores( | ||
QuestionType type, | ||
QuestionCategory category, | ||
String content, | ||
String contentToken | ||
) { | ||
|
||
public static SelectQuestionCores of(final QuestionType type, final QuestionCategory category, final String content, | ||
final String contentToken) { | ||
return SelectQuestionCores.builder() | ||
.type(type) | ||
.category(category) | ||
.content(content) | ||
.contentToken(contentToken) | ||
.build(); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
src/main/java/mju/iphak/maru_egg/question/dao/request/SelectQuestions.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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package mju.iphak.maru_egg.question.dao.request; | ||
|
||
import org.springframework.data.domain.Pageable; | ||
|
||
import lombok.Builder; | ||
import mju.iphak.maru_egg.question.domain.QuestionCategory; | ||
import mju.iphak.maru_egg.question.domain.QuestionType; | ||
|
||
@Builder | ||
public record SelectQuestions( | ||
QuestionType type, | ||
QuestionCategory category, | ||
String content, | ||
Integer cursorViewCount, | ||
Long questionId, | ||
Pageable pageable | ||
) { | ||
public static SelectQuestions of(QuestionType type, | ||
QuestionCategory category, | ||
String content, | ||
Integer cursorViewCount, | ||
Long questionId, | ||
Pageable pageable) { | ||
return SelectQuestions.builder() | ||
.type(type) | ||
.category(category) | ||
.content(content) | ||
.cursorViewCount(cursorViewCount) | ||
.questionId(questionId) | ||
.pageable(pageable) | ||
.build(); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...g/question/dto/response/QuestionCore.java → ...g/question/dao/response/QuestionCore.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
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
Oops, something went wrong.