-
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.
[featy][#93] 온보딩 상태 조회 & 온보딩 상태 업데이트 api 구현
- Loading branch information
1 parent
25a7a06
commit 0e678a3
Showing
10 changed files
with
137 additions
and
4 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
4 changes: 4 additions & 0 deletions
4
src/main/java/com/server/bbo_gak/domain/user/dto/request/UserOnboardStatusUpdateRequest.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,4 @@ | ||
package com.server.bbo_gak.domain.user.dto.request; | ||
|
||
public record UserOnboardStatusUpdateRequest(String onboardStatus) { | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/com/server/bbo_gak/domain/user/dto/response/UserOnboardStatusGetResponse.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,7 @@ | ||
package com.server.bbo_gak.domain.user.dto.response; | ||
|
||
public record UserOnboardStatusGetResponse( | ||
String onboardStatus | ||
) { | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/com/server/bbo_gak/domain/user/entity/OnboardStatus.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,23 @@ | ||
package com.server.bbo_gak.domain.user.entity; | ||
|
||
import com.server.bbo_gak.global.error.exception.ErrorCode; | ||
import com.server.bbo_gak.global.error.exception.NotFoundException; | ||
import java.util.Arrays; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public enum OnboardStatus { | ||
NOT_STARTED("온보딩_미완료"), | ||
COMPLETED("온보딩_완료"); | ||
|
||
private final String value; | ||
|
||
public static OnboardStatus findByValue(String value) { | ||
return Arrays.stream(OnboardStatus.values()) | ||
.filter(onboardStatus -> onboardStatus.getValue().equals(value)) | ||
.findFirst() | ||
.orElseThrow((() -> new NotFoundException(ErrorCode.ONBOARD_STATUS_NOT_FOUND))); | ||
} | ||
} |
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
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