-
Notifications
You must be signed in to change notification settings - Fork 1
동아리 정보 수정 API 구현(재 PR) #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다.
작업 완료 후 코드 포맷팅과 터미널에 ./gradlew checkstyleMain 명령어 입력하셔서 코드 스타일 체크 부탁드릴게요
브랜치 명에 CAM-{숫자}는 저희가 이슈 관리 툴로 리니어 프로그램을 사용하고 있어 이슈 번호를 올리는거라 굳이 포함 안하셔도 됩니다!
| public Club toEntity(University university) { | ||
| return Club.builder() | ||
| .name(name) | ||
| .description(description) | ||
| .introduce(introduce) | ||
| .imageUrl(imageUrl) | ||
| .location(location) | ||
| .clubCategory(clubCategory) | ||
| .university(university) | ||
| .build(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
toEntity 메소드보다 Club 엔티티에서 of 라는 네이밍의 정적 팩토리 메소드를 만드는건 어떻게 생각하시나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분은 깊게 고민 못해봤던 것 같습니다
조금 고민해보았는데, 말씀해주신 대로 Club에 of 를 만드는 것이 더 적절한 것 같습니다
정적 팩토리 메소드도 생성자처럼 객체를 만들어주는 역할을 하기 때문에,
객체를 생성하는 것과 관련된 건 객체(Club)안에 응집시키는 것이 좋을 것 같습니다. 수정하겠습니다
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import jakarta.validation.constraints.NotNull; | ||
|
|
||
| public record ClubRepresentativeUpdateRequest( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
얘는 지금 사용하는건가요?? 아니면 제거해도 될 것 같아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
앗 이거는 원래 후에 진행할라고 했던 동아리 권한 관리 pr을 생성하여 진행하려고 했는데, 커밋하다가 해당 파일까지 같이 커밋된 것 같습니다..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그러면 현재 브랜치에서는 해당 파일 삭제 부탁드릴게요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 삭제하겠습니다
| ClubPosition presidentPosition = ClubPosition.builder() | ||
| .name("회장") | ||
| .clubPositionGroup(PRESIDENT) | ||
| .club(savedClub) | ||
| .build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
동아리를 처음 만들 때는 ClubPositionGroup에 있는 모든 직급을 불러서 ClubPosition으로 만들어야 할 것 같아요!
회장만 만들어둔다면 추후에 동아리원을 받는 경우 일반 회원 직급이 존재하지 않아 문제가 발생할 것으로 보여요
ClubPositionGroup에 부회장 직급도 추가해주실 수 있으실까요??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 말씀해주신 것처럼, 처음 동아리 생성할 때는 각 ClubPositionGroup 마다의 기본 ClubPosition 을 생성하도록 하겠습니다.
그리고 부회장 부분은 다음으로 진행할 '동아리 권한 관리 관련' pr 부분에서 추가하도록 하겠습니다..!
동아리 정보 수정 API 최종 구현 완료했습니다.
슬랙에서 논의했던 것처럼 동아리 수정 페이지(프로필, 상세정보)를 하나로 합치는 것에 맞추어 API도 통합했습니다.
또한 대표 임원진에 대한 정보는 동아리의 '회장' 에 해당하는 사람의 정보를 불러오도록 하였습니다.
그리고 동아리 생성과 같은 경우, 원래 보류하기로 하였으나 우선 기본적인 생성 API만 만들어 보았습니다.
확인 후 리뷰 부탁드리겠습니다. 감사합니다