-
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.
[DDOING-000] 동아리원 명단 조회 API 분리 (#157)
- Loading branch information
Showing
8 changed files
with
110 additions
and
54 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
39 changes: 39 additions & 0 deletions
39
...ngdong/ddingdongBE/domain/club/controller/dto/response/CentralClubMemberListResponse.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,39 @@ | ||
package ddingdong.ddingdongBE.domain.club.controller.dto.response; | ||
|
||
import ddingdong.ddingdongBE.domain.clubmember.service.dto.query.CentralClubMemberListQuery; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
@Schema( | ||
name = "ClubMemberResponse", | ||
description = "중앙동아리 - 동아리원 조회 응답" | ||
) | ||
public record CentralClubMemberListResponse( | ||
@Schema(description = "식별자", example = "1") | ||
Long id, | ||
@Schema(description = "이름", example = "홍길동") | ||
String name, | ||
@Schema(description = "학번", example = "60001111") | ||
String studentNumber, | ||
@Schema(description = "전화번호", example = "010-1234-5678") | ||
String phoneNumber, | ||
@Schema(description = "동아리원 역할", | ||
example = "LEADER", | ||
allowableValues = {"LEADER", "EXECUTION", "MEMBER"} | ||
) | ||
String position, | ||
@Schema(description = "학과", example = "학과") | ||
String department | ||
) { | ||
|
||
public static CentralClubMemberListResponse from(CentralClubMemberListQuery query) { | ||
return new CentralClubMemberListResponse( | ||
query.id(), | ||
query.name(), | ||
query.studentNumber(), | ||
query.phoneNumber(), | ||
query.position(), | ||
query.department() | ||
); | ||
} | ||
|
||
} |
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
25 changes: 25 additions & 0 deletions
25
...ddingdong/ddingdongBE/domain/clubmember/service/dto/query/CentralClubMemberListQuery.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,25 @@ | ||
package ddingdong.ddingdongBE.domain.clubmember.service.dto.query; | ||
|
||
import ddingdong.ddingdongBE.domain.clubmember.entity.ClubMember; | ||
|
||
public record CentralClubMemberListQuery( | ||
Long id, | ||
String name, | ||
String studentNumber, | ||
String phoneNumber, | ||
String position, | ||
String department | ||
) { | ||
|
||
public static CentralClubMemberListQuery from(ClubMember clubMember){ | ||
return new CentralClubMemberListQuery( | ||
clubMember.getId(), | ||
clubMember.getName(), | ||
clubMember.getStudentNumber(), | ||
clubMember.getPhoneNumber(), | ||
clubMember.getPosition().getName(), | ||
clubMember.getDepartment() | ||
); | ||
} | ||
|
||
} |
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