-
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.
- Loading branch information
Showing
4 changed files
with
70 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
47 changes: 47 additions & 0 deletions
47
src/main/java/com/MtoM/MtoM/domain/user/dto/res/SearchUserResponseDto.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,47 @@ | ||
package com.MtoM.MtoM.domain.user.dto.res; | ||
|
||
import com.MtoM.MtoM.domain.user.domain.Gender; | ||
import com.MtoM.MtoM.domain.user.domain.Major; | ||
import com.MtoM.MtoM.domain.user.domain.UserDomain; | ||
import com.MtoM.MtoM.domain.user.dto.Skill; | ||
import lombok.Getter; | ||
|
||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
|
||
@Getter | ||
public class SearchUserResponseDto { | ||
private String userId; | ||
private String name; | ||
private Long studentId; | ||
private String birthday; | ||
private Gender gender; | ||
private String phonenumber; | ||
private Major major; | ||
private String email; | ||
private String profile; | ||
private String mbti; | ||
private String personal; | ||
private String imogi; | ||
private String mentoring_topics; | ||
private List<Skill> skills; | ||
|
||
public SearchUserResponseDto(UserDomain user){ | ||
this.userId = user.getId(); | ||
this.name = user.getName(); | ||
this.studentId = user.getStudent_id(); | ||
this.birthday = user.getBirthday(); | ||
this.gender = user.getGender(); | ||
this.phonenumber = user.getPhonenumber(); | ||
this.major = user.getMajor(); | ||
this.email = user.getEmail(); | ||
this.profile = user.getProfile(); | ||
this.mbti = user.getMbti(); | ||
this.personal = user.getPersonal(); | ||
this.imogi = user.getImogi(); | ||
this.mentoring_topics = user.getMentoring_topics(); | ||
this.skills = user.getSkillDomainList().stream() | ||
.map(skillDomain -> new Skill(skillDomain.getSkill_name(), skillDomain.getSkill_score())) | ||
.collect(Collectors.toList()); | ||
} | ||
} |
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