-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 회원 정보 조회 API * style: spotless
- Loading branch information
Showing
4 changed files
with
49 additions
and
6 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
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
31 changes: 31 additions & 0 deletions
31
src/main/java/com/depromeet/domain/member/dto/response/MemberFindOneResponse.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 com.depromeet.domain.member.dto.response; | ||
|
||
import com.depromeet.domain.member.domain.Member; | ||
import com.depromeet.domain.member.domain.MemberRole; | ||
import com.depromeet.domain.member.domain.MemberStatus; | ||
import com.depromeet.domain.member.domain.MemberVisibility; | ||
import java.time.LocalDateTime; | ||
|
||
public record MemberFindOneResponse( | ||
Long memberId, | ||
String nickname, | ||
String profileImageUrl, | ||
MemberStatus memberStatus, | ||
MemberRole memberRole, | ||
MemberVisibility memberVisibility, | ||
String username, | ||
LocalDateTime createdAt, | ||
LocalDateTime updatedAt) { | ||
public static MemberFindOneResponse from(Member member) { | ||
return new MemberFindOneResponse( | ||
member.getId(), | ||
member.getProfile().getNickname(), | ||
member.getProfile().getProfileImageUrl(), | ||
member.getStatus(), | ||
member.getRole(), | ||
member.getVisibility(), | ||
member.getUsername(), | ||
member.getCreatedAt(), | ||
member.getUpdatedAt()); | ||
} | ||
} |