-
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.
Merge pull request #7 from team-nabi/NABI-102--yejin--refactor--oauth…
…2-google-kakao Nabi 102 yejin refactor oauth2 google kakao
- Loading branch information
Showing
31 changed files
with
374 additions
and
435 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
src/main/java/org/prgrms/nabimarketbe/domain/user/Role.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,14 @@ | ||
package org.prgrms.nabimarketbe.domain.user; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public enum Role { | ||
GUEST("ROLE_GUEST"), | ||
|
||
USER("ROLE_USER"); | ||
|
||
private final String key; | ||
} |
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
30 changes: 0 additions & 30 deletions
30
src/main/java/org/prgrms/nabimarketbe/domain/user/dto/UserResponseDto.java
This file was deleted.
Oops, something went wrong.
11 changes: 3 additions & 8 deletions
11
...ketbe/domain/user/dto/UserRequestDto.java → ...main/user/dto/request/UserRequestDTO.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
22 changes: 22 additions & 0 deletions
22
src/main/java/org/prgrms/nabimarketbe/domain/user/dto/request/UserSignInRequestDTO.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,22 @@ | ||
package org.prgrms.nabimarketbe.domain.user.dto.request; | ||
|
||
import lombok.Builder; | ||
import org.prgrms.nabimarketbe.domain.user.Role; | ||
import org.prgrms.nabimarketbe.domain.user.entity.User; | ||
|
||
@Builder | ||
public record UserSignInRequestDTO( | ||
String accountId, | ||
String nickname, | ||
String provider | ||
) { | ||
public User toEntity() { | ||
return User.builder() | ||
.accountId(accountId) | ||
.nickname(nickname) | ||
.provider(provider) | ||
.role(Role.USER) | ||
.build(); | ||
} | ||
} | ||
|
31 changes: 31 additions & 0 deletions
31
src/main/java/org/prgrms/nabimarketbe/domain/user/dto/response/UserResponseDTO.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,31 @@ | ||
package org.prgrms.nabimarketbe.domain.user.dto.response; | ||
|
||
import lombok.Getter; | ||
import org.prgrms.nabimarketbe.domain.user.Role; | ||
import org.prgrms.nabimarketbe.domain.user.entity.User; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Getter | ||
public class UserResponseDTO { | ||
private final Long userId; | ||
|
||
private final String accountId; | ||
|
||
private final String nickName; | ||
|
||
private final Role role; | ||
|
||
private final LocalDateTime createdDate; | ||
|
||
private final LocalDateTime modifiedDate; | ||
|
||
public UserResponseDTO(User user) { | ||
this.userId = user.getUserId(); | ||
this.accountId = user.getAccountId(); | ||
this.nickName = user.getNickname(); | ||
this.role = user.getRole(); | ||
this.createdDate = user.getCreatedDate(); | ||
this.modifiedDate = user.getModifiedDate(); | ||
} | ||
} |
18 changes: 0 additions & 18 deletions
18
src/main/java/org/prgrms/nabimarketbe/domain/user/dto/sign/UserSignupRequestDto.java
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
src/main/java/org/prgrms/nabimarketbe/domain/user/dto/sign/UserSocialLoginRequestDto.java
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
src/main/java/org/prgrms/nabimarketbe/domain/user/dto/sign/UserSocialSignupRequestDto.java
This file was deleted.
Oops, something went wrong.
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.