-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat/update signup response] - 회원가입에 환영알(Egg) 정보 추가 #95
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 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7d9bd6f
:sparkles: feat : add greeting-egg info to response
ekgns33 ff7498e
:recycle: refactor : extract granting egg logic from register service…
ekgns33 034ff52
:sparkles: feat : return entity from EggGrantService
ekgns33 0682201
:white_check_mark: test : update userfixtures
ekgns33 722c86f
:white_check_mark: test : add egg-fixtures
ekgns33 1d613e3
:white_check_mark: test : add unit test
ekgns33 64fc033
:white_check_mark: test : apply refactoring update
ekgns33 66dbd67
:white_check_mark: test : fix passing parameter for imgurl
ekgns33 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
14 changes: 11 additions & 3 deletions
14
src/main/java/org/runimo/runimo/auth/service/dto/SignupUserResponse.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,18 +1,26 @@ | ||
| package org.runimo.runimo.auth.service.dto; | ||
|
|
||
| import org.runimo.runimo.item.domain.Egg; | ||
| import org.runimo.runimo.user.domain.User; | ||
|
|
||
| public record SignupUserResponse( | ||
| Long userId, | ||
| String nickname, | ||
| String imgUrl, | ||
| TokenPair tokenPair | ||
| TokenPair tokenPair, | ||
| String greetingEggName, | ||
| String greetingEggType, | ||
| String greetingEggImgUrl | ||
| ) { | ||
|
|
||
| public SignupUserResponse(final User user, final TokenPair tokenPair) { | ||
| public SignupUserResponse(final User user, final TokenPair tokenPair, final Egg greetingEgg) { | ||
| this(user.getId(), | ||
| user.getNickname(), | ||
| user.getImgUrl(), | ||
| tokenPair); | ||
| tokenPair, | ||
| greetingEgg.getName(), | ||
| greetingEgg.getEggType().getName(), | ||
| greetingEgg.getImgUrl() | ||
| ); | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| package org.runimo.runimo.item; | ||
|
|
||
| import org.runimo.runimo.item.domain.Egg; | ||
| import org.runimo.runimo.item.domain.EggType; | ||
|
|
||
| public final class EggFixtures { | ||
|
|
||
| public static final String TEST_EGG_CODE = "TEST_EGG"; | ||
| public static final String TEST_EGG_NAME = "Test Egg"; | ||
| public static final String TEST_EGG_DESCRIPTION = "A test egg for testing purposes"; | ||
| public static final String TEST_EGG_IMG_URL = "test_egg.png"; | ||
|
|
||
| public static final String TEST_EGG_TYPE_NAME = "Test Type"; | ||
| public static final String TEST_EGG_TYPE_CODE = "TEST"; | ||
| public static final Long TEST_EGG_TYPE_DISTANCE = 1000L; | ||
| public static final Integer TEST_EGG_TYPE_LEVEL = 1; | ||
|
|
||
| public static Egg createDefaultEgg() { | ||
| return Egg.builder() | ||
| .itemCode(TEST_EGG_CODE) | ||
| .name(TEST_EGG_NAME) | ||
| .description(TEST_EGG_DESCRIPTION) | ||
| .imgUrl(TEST_EGG_IMG_URL) | ||
| .eggType(createDefaultEggType()) | ||
| .hatchRequireAmount(10L) | ||
| .build(); | ||
| } | ||
|
|
||
| public static Egg createCustomEgg(String itemCode, String name, String description, | ||
| String imgUrl, EggType eggType, Long hatchRequireAmount) { | ||
| return Egg.builder() | ||
| .itemCode(itemCode) | ||
| .name(name) | ||
| .description(description) | ||
| .imgUrl(imgUrl) | ||
| .eggType(eggType) | ||
| .hatchRequireAmount(hatchRequireAmount) | ||
| .build(); | ||
| } | ||
|
|
||
| public static EggType createDefaultEggType() { | ||
| return EggType.of(TEST_EGG_TYPE_NAME, TEST_EGG_TYPE_CODE, TEST_EGG_TYPE_DISTANCE, | ||
| TEST_EGG_TYPE_LEVEL); | ||
| } | ||
|
|
||
| public static EggType createCustomEggType(String name, String code, | ||
| Long requiredDistanceInMeters, Integer level) { | ||
| return EggType.of(name, code, requiredDistanceInMeters, level); | ||
| } | ||
|
|
||
| } |
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
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.