-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: 패키지 구조 및 코드 스타일 개선 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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: 0 additions & 7 deletions
7
src/main/java/queuing/core/friend/application/dto/GetFriendListCommand.java
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
src/main/java/queuing/core/friend/application/query/GetFriendListQuery.java
This file contains hidden or 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,8 @@ | ||
| package queuing.core.friend.application.query; | ||
|
|
||
| public record GetFriendListQuery( | ||
| String userSlug, | ||
| Long lastId, | ||
| int size | ||
| ) { | ||
| } | ||
patulus marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
2 changes: 1 addition & 1 deletion
2
...friend/application/dto/FriendSummary.java → ...end/application/result/FriendSummary.java
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -2,4 +2,4 @@ | |
|
|
||
| public interface DeleteFriendUseCase { | ||
| void deleteFriend(String userSlug, String targetSlug); | ||
| } | ||
| } | ||
8 changes: 4 additions & 4 deletions
8
src/main/java/queuing/core/friend/application/usecase/GetFriendListUseCase.java
This file contains hidden or 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,9 +1,9 @@ | ||
| package queuing.core.friend.application.usecase; | ||
|
|
||
| import queuing.core.friend.application.dto.FriendSummary; | ||
| import queuing.core.friend.application.dto.GetFriendListCommand; | ||
| import queuing.core.friend.application.query.GetFriendListQuery; | ||
| import queuing.core.friend.application.result.FriendSummary; | ||
| import queuing.core.global.dto.SliceResult; | ||
|
|
||
| public interface GetFriendListUseCase { | ||
| SliceResult<FriendSummary> getFriendList(GetFriendListCommand command); | ||
| } | ||
| SliceResult<FriendSummary> getFriendList(GetFriendListQuery query); | ||
| } |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -2,4 +2,4 @@ | |
|
|
||
| public interface SendFriendRequestUseCase { | ||
| void sendRequest(String requesterSlug, String targetSlug); | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
2 changes: 1 addition & 1 deletion
2
src/main/java/queuing/core/friend/presentation/response/FriendResponse.java
This file contains hidden or 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 hidden or 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,55 @@ | ||
| package queuing.core.global.dto; | ||
|
|
||
| /** | ||
| * 페이징 조회를 위한 요청 조건을 담습니다. | ||
| * | ||
| * @param page 현재 페이지 번호 (1부터 시작) | ||
| * @param size 한 페이지당 보여줄 아이템 개수 | ||
| * @param sort 정렬 조건 | ||
| */ | ||
| public record PageCondition( | ||
| int page, | ||
| int size, | ||
| String sort | ||
| ) { | ||
| public PageCondition { | ||
| if (page < 1) { | ||
| throw new IllegalArgumentException("Page number must be 1 or greater."); | ||
| } | ||
| if (size < 1) { | ||
| throw new IllegalArgumentException("Page size must be 1 or greater."); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * 정렬 조건 없는 {@code PageCondition} 객체를 생성합니다. | ||
| * | ||
| * @param page 현재 페이지 번호 (1부터 시작) | ||
| * @param size 한 페이지당 보여줄 아이템 개수 | ||
| * @return PageCondition 객체 | ||
| */ | ||
| public static PageCondition of(int page, int size) { | ||
| return new PageCondition(page, size, null); | ||
| } | ||
|
|
||
| /** | ||
| * 정렬 조건이 있는 {@code PageCondition} 객체를 생성합니다. | ||
| * | ||
| * @param page 현재 페이지 번호 (1부터 시작) | ||
| * @param size 한 페이지당 보여줄 아이템 개수 | ||
| * @param sort 정렬 조건 | ||
| * @return PageCondition 객체 | ||
| */ | ||
| public static PageCondition of(int page, int size, String sort) { | ||
| return new PageCondition(page, size, sort); | ||
| } | ||
|
|
||
| /** | ||
| * 데이터베이스 조회 시작 지점을 반환합니다. | ||
|
|
||
| * @return offset | ||
| */ | ||
patulus marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| public long offset() { | ||
| return (long) (page - 1) * size; | ||
| } | ||
| } | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.