-
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 #51 from Beyond-B/feat/49-mypage
✨ [Feat]: 마이페이지 조회
- Loading branch information
Showing
4 changed files
with
56 additions
and
3 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
16 changes: 16 additions & 0 deletions
16
src/main/java/com/beyondB/beyondB/converter/UserConverter.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,16 @@ | ||
package com.beyondB.beyondB.converter; | ||
|
||
import com.beyondB.beyondB.dto.response.UserResponseDTO.UserDetailDTO; | ||
import com.beyondB.beyondB.entity.User; | ||
|
||
public class UserConverter { | ||
|
||
public static UserDetailDTO toUserDetailDTO(User user) { | ||
return UserDetailDTO.builder() | ||
.id(user.getId()) | ||
.username(user.getUsername()) | ||
.picture(user.getPicture()) | ||
.age(user.getAge()) | ||
.build(); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/com/beyondB/beyondB/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,20 @@ | ||
package com.beyondB.beyondB.dto.response; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
public class UserResponseDTO { | ||
|
||
@Builder | ||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public static class UserDetailDTO { | ||
private Long id; | ||
private String username; | ||
private String picture; | ||
private String age; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -2,10 +2,10 @@ | |
|
||
public enum Emotion { | ||
HAPPY, | ||
SAD, | ||
DEPRESSED, | ||
ANGRY, | ||
SURPRISED, | ||
DISGUSTED, | ||
SCARED, | ||
SADNESS, | ||
WORRIED, | ||
; | ||
} |