-
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 #95 from IT-Cotato/feature/mypage#3-member-info
Feature: 마이페이지 개인 정보 반환 API 구현 (#86)
- Loading branch information
Showing
3 changed files
with
39 additions
and
0 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
24 changes: 24 additions & 0 deletions
24
src/main/java/cotato/csquiz/domain/dto/member/MemberMyPageInfoResponse.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,24 @@ | ||
package cotato.csquiz.domain.dto.member; | ||
|
||
import cotato.csquiz.domain.entity.Member; | ||
import cotato.csquiz.domain.enums.MemberPosition; | ||
|
||
public record MemberMyPageInfoResponse( | ||
Long memberId, | ||
String email, | ||
String name, | ||
int generationNumber, | ||
MemberPosition memberPosition, | ||
String phoneNumber | ||
) { | ||
public static MemberMyPageInfoResponse from(Member member) { | ||
return new MemberMyPageInfoResponse( | ||
member.getId(), | ||
member.getEmail(), | ||
member.getName(), | ||
member.getGeneration().getNumber(), | ||
member.getPosition(), | ||
member.getPhoneNumber() | ||
); | ||
} | ||
} |
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