-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…-category 프로젝트 기술 스택 및 멤버 카테고리 별로 조회되도록 응답 객체 수정
- Loading branch information
Showing
13 changed files
with
157 additions
and
147 deletions.
There are no files selected for viewing
18 changes: 7 additions & 11 deletions
18
src/main/java/sixgaezzang/sidepeek/projects/dto/response/MemberSummary.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 |
---|---|---|
@@ -1,28 +1,24 @@ | ||
package sixgaezzang.sidepeek.projects.dto.response; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.util.List; | ||
import lombok.Builder; | ||
import sixgaezzang.sidepeek.projects.domain.member.Member; | ||
import sixgaezzang.sidepeek.users.domain.User; | ||
import sixgaezzang.sidepeek.users.dto.response.UserSummary; | ||
|
||
@Schema(description = "프로젝트 멤버 정보") | ||
@Builder | ||
public record MemberSummary( | ||
@Schema(description = "프로젝트 멤버 식별자", example = "1") | ||
Long id, | ||
@Schema(description = "프로젝트 멤버 역할", example = "백엔드") | ||
String role, | ||
@Schema(description = "프로젝트 멤버 회원/비회원 상세 정보") | ||
UserSummary userSummary | ||
List<UserSummary> userSummary | ||
) { | ||
|
||
public static MemberSummary from(Member member) { | ||
User user = member.getUser(); | ||
UserSummary userSummary = (user != null) ? UserSummary.from(user, member.getNickname()) : | ||
UserSummary.from(member.getNickname()); | ||
|
||
return new MemberSummary(member.getId(), member.getRole(), userSummary); | ||
public static MemberSummary of(String role, List<UserSummary> members) { | ||
return MemberSummary.builder() | ||
.role(role) | ||
.userSummary(members) | ||
.build(); | ||
} | ||
|
||
} |
13 changes: 5 additions & 8 deletions
13
src/main/java/sixgaezzang/sidepeek/projects/dto/response/ProjectSkillSummary.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
4 changes: 2 additions & 2 deletions
4
...s/repository/member/MemberRepository.java → ...projects/repository/MemberRepository.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
11 changes: 0 additions & 11 deletions
11
src/main/java/sixgaezzang/sidepeek/projects/repository/member/MemberRepositoryCustom.java
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
...main/java/sixgaezzang/sidepeek/projects/repository/member/MemberRepositoryCustomImpl.java
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.