-
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 #40 from YAPP-Github/feat/ISSUE-39
- Loading branch information
Showing
4 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/main/java/com/fullcar/member/application/member/MemberMapper.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,19 @@ | ||
package com.fullcar.member.application.member; | ||
|
||
import com.fullcar.member.domain.member.Member; | ||
import com.fullcar.member.presentation.member.dto.response.MemberGetResponseDto; | ||
import lombok.AccessLevel; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
@RequiredArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class MemberMapper { | ||
|
||
public MemberGetResponseDto toDto(Member member) { | ||
return MemberGetResponseDto.builder() | ||
.nickname(member.getNickname()) | ||
.companyName(member.getCompany().getCompanyName()) | ||
.build(); | ||
} | ||
} |
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
18 changes: 18 additions & 0 deletions
18
src/main/java/com/fullcar/member/presentation/member/dto/response/MemberGetResponseDto.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,18 @@ | ||
package com.fullcar.member.presentation.member.dto.response; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.*; | ||
|
||
@Getter | ||
@Builder | ||
@AllArgsConstructor(access = AccessLevel.PROTECTED) | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Schema(description = "회원 정보 응답 모델") | ||
public class MemberGetResponseDto { | ||
|
||
@Schema(description = "회원 닉네임", example = "피곤한 물개") | ||
private String nickname; | ||
|
||
@Schema(description = "회사명", example = "현대 자동차") | ||
private String companyName; | ||
} |