diff --git a/src/main/java/kaboo/kaboo_auth/domain/dto/request/MemberInfoUpdateRequest.java b/src/main/java/kaboo/kaboo_auth/domain/dto/request/MemberInfoUpdateRequest.java new file mode 100644 index 0000000..53ab147 --- /dev/null +++ b/src/main/java/kaboo/kaboo_auth/domain/dto/request/MemberInfoUpdateRequest.java @@ -0,0 +1,13 @@ +package kaboo.kaboo_auth.domain.dto.request; + +import kaboo.kaboo_auth.domain.Course; +import lombok.Getter; + +@Getter +public class MemberInfoUpdateRequest { + private String koreaName; + private String englishName; + private int classNum; + private Course course; + +} diff --git a/src/main/java/kaboo/kaboo_auth/domain/dto/request/MemberIntroduceUpdateRequest.java b/src/main/java/kaboo/kaboo_auth/domain/dto/request/MemberIntroduceUpdateRequest.java new file mode 100644 index 0000000..5720aa7 --- /dev/null +++ b/src/main/java/kaboo/kaboo_auth/domain/dto/request/MemberIntroduceUpdateRequest.java @@ -0,0 +1,8 @@ +package kaboo.kaboo_auth.domain.dto.request; + +import lombok.Getter; + +@Getter +public class MemberIntroduceUpdateRequest { + String introduce; +} diff --git a/src/main/java/kaboo/kaboo_auth/domain/dto/response/MemberInfoResponse.java b/src/main/java/kaboo/kaboo_auth/domain/dto/response/MemberInfoResponse.java index 474b47d..5942314 100644 --- a/src/main/java/kaboo/kaboo_auth/domain/dto/response/MemberInfoResponse.java +++ b/src/main/java/kaboo/kaboo_auth/domain/dto/response/MemberInfoResponse.java @@ -1,6 +1,7 @@ package kaboo.kaboo_auth.domain.dto.response; import kaboo.kaboo_auth.domain.Course; +import kaboo.kaboo_auth.domain.entity.Member; import lombok.AllArgsConstructor; import lombok.Getter; @@ -11,4 +12,11 @@ public class MemberInfoResponse { private String englishName; private int classNum; private Course course; + + public MemberInfoResponse(Member member) { + this.koreaName = member.getKoreaName(); + this.englishName = member.getEnglishName(); + this.classNum = member.getClassNum(); + this.course = member.getCourse(); + } } diff --git a/src/main/java/kaboo/kaboo_auth/domain/dto/response/MemberIntroduceResponse.java b/src/main/java/kaboo/kaboo_auth/domain/dto/response/MemberIntroduceResponse.java index bc91986..ff2af79 100644 --- a/src/main/java/kaboo/kaboo_auth/domain/dto/response/MemberIntroduceResponse.java +++ b/src/main/java/kaboo/kaboo_auth/domain/dto/response/MemberIntroduceResponse.java @@ -1,5 +1,6 @@ package kaboo.kaboo_auth.domain.dto.response; +import kaboo.kaboo_auth.domain.entity.Member; import lombok.AllArgsConstructor; import lombok.Getter; @@ -7,4 +8,8 @@ @AllArgsConstructor public class MemberIntroduceResponse { private String introduce; + + public MemberIntroduceResponse(Member member) { + this.introduce = member.getIntroduce(); + } } diff --git a/src/main/java/kaboo/kaboo_auth/domain/dto/response/MemberListResponse.java b/src/main/java/kaboo/kaboo_auth/domain/dto/response/MemberListResponse.java index 48fff0f..0612e2d 100644 --- a/src/main/java/kaboo/kaboo_auth/domain/dto/response/MemberListResponse.java +++ b/src/main/java/kaboo/kaboo_auth/domain/dto/response/MemberListResponse.java @@ -1,5 +1,8 @@ package kaboo.kaboo_auth.domain.dto.response; +import java.util.List; + +import kaboo.kaboo_auth.domain.entity.Member; import lombok.AllArgsConstructor; import lombok.Getter; @@ -9,4 +12,12 @@ public class MemberListResponse { private int classNum; private int memberNum; private MemberInfoResponse[] memberList; + + public MemberListResponse(List members, int classNum) { + this.classNum = classNum; + this.memberNum = members.size(); + this.memberList = members.stream() + .map(MemberInfoResponse::new) + .toArray(MemberInfoResponse[]::new); + } } diff --git a/src/main/java/kaboo/kaboo_auth/domain/dto/response/ResponseDTO.java b/src/main/java/kaboo/kaboo_auth/domain/dto/response/ResponseDTO.java index 6190dd1..a292021 100644 --- a/src/main/java/kaboo/kaboo_auth/domain/dto/response/ResponseDTO.java +++ b/src/main/java/kaboo/kaboo_auth/domain/dto/response/ResponseDTO.java @@ -9,4 +9,10 @@ public class ResponseDTO { private boolean success; private String message; private T data; + + public ResponseDTO(T data) { + success = true; + message = "요청이 성공적으로 처리되었습니다."; + this.data = data; + } }