-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: 스터디 관련 DTO
에 멘토 이름 필드 추가
#945
Conversation
📝 WalkthroughWalkthrough이 PR은 Changes
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Hello @Sangwook02, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
This pull request addresses issue #944 by adding a mentorName
field to the StudyManagerDto
and StudyStudentDto
data transfer objects. This change allows the study information to include the mentor's name, in addition to their ID. The changes involve modifying the StudyManagerDto
and StudyStudentDto
classes to include the new field and updating the from
method in StudyManagerDto
to populate the mentorName
from the StudyV2
entity.
Highlights
- Feature Enhancement: The
StudyManagerDto
andStudyStudentDto
now include the mentor's name. - Data Transfer Object Modification: The
StudyManagerDto
andStudyStudentDto
classes have been updated to include amentorName
field. - Data Population: The
from
method inStudyManagerDto
has been updated to populate thementorName
field from theStudyV2
entity.
Changelog
- src/main/java/com/gdschongik/gdsc/domain/studyv2/dto/dto/StudyManagerDto.java
- Added
mentorName
field to theStudyManagerDto
record (line 28). - Modified the
from
method to includementorName
when creating aStudyManagerDto
instance (line 45).
- Added
- src/main/java/com/gdschongik/gdsc/domain/studyv2/dto/dto/StudyStudentDto.java
- Added
mentorName
field to theStudyStudentDto
record (line 25).
- Added
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Did you know?
The concept of DTOs is closely related to the design principle of minimizing data transfer between layers or tiers in an application architecture, improving performance and reducing coupling.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
DTO
에 멘토 이름 필드 추가DTO
에 멘토 이름 필드 추가
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.
Code Review
The pull request adds the mentor's name to the StudyManagerDto
and StudyStudentDto
. This change enhances the information provided by these DTOs, making it easier to display the mentor's name without needing to make additional calls to fetch the mentor's details. The code changes are straightforward and seem correct.
Merge Readiness
The code changes are straightforward and seem correct. I don't see any issues that need to be addressed before merging. However, as I am unable to directly approve the pull request, I recommend that others review and approve this code before merging.
Job Summary for GradleCheck Style and Test to Develop :: build-test
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/main/java/com/gdschongik/gdsc/domain/studyv2/dto/dto/StudyStudentDto.java (1)
9-11
: JavaDoc 업데이트 제안새로 추가된 mentorName 필드에 대한 설명을 JavaDoc에 추가하는 것이 좋을 것 같습니다.
/** * 스터디 학생 DTO입니다. 디스코드 관련 ID가 포함되어 있지 않습니다. + * 멘토 ID와 멘토 이름 정보를 포함합니다. */
src/main/java/com/gdschongik/gdsc/domain/studyv2/dto/dto/StudyManagerDto.java (1)
10-12
: JavaDoc 업데이트 제안새로 추가된 mentorName 필드에 대한 설명을 JavaDoc에 추가하는 것이 좋을 것 같습니다.
/** * 스터디 관리자 DTO입니다. 디스코드 관련 ID가 포함되어 있습니다. + * 멘토 ID와 멘토 이름 정보를 포함합니다. */
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/main/java/com/gdschongik/gdsc/domain/studyv2/dto/dto/StudyManagerDto.java
(2 hunks)src/main/java/com/gdschongik/gdsc/domain/studyv2/dto/dto/StudyStudentDto.java
(1 hunks)
🔇 Additional comments (3)
src/main/java/com/gdschongik/gdsc/domain/studyv2/dto/dto/StudyStudentDto.java (1)
24-25
: mentorName 필드가 적절하게 추가되었습니다.스터디 정보에 멘토 이름을 추가하는 목표에 맞게 필드가 잘 추가되었습니다. DTO에 멘토 이름이 포함됨으로써 클라이언트에서 더 풍부한 정보를 제공할 수 있게 되었습니다.
src/main/java/com/gdschongik/gdsc/domain/studyv2/dto/dto/StudyManagerDto.java (2)
27-28
: mentorName 필드가 적절하게 추가되었습니다.StudyStudentDto와 일관성 있게 StudyManagerDto에도 멘토 이름 필드가 잘 추가되었습니다.
44-45
: Null 안전성 확인 필요
study.getMentor()
가 null을 반환할 가능성이 있다면 NullPointerException이 발생할 수 있습니다. 아래와 같이 Optional 또는 null 체크를 고려해 보세요.study.getDiscordChannelId(), study.getDiscordRoleId(), - study.getMentor().getId(), - study.getMentor().getName()); + study.getMentor() != null ? study.getMentor().getId() : null, + study.getMentor() != null ? study.getMentor().getName() : null);
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.
lgtm
@@ -40,6 +41,7 @@ public static StudyManagerDto from(StudyV2 study) { | |||
study.getApplicationPeriod(), | |||
study.getDiscordChannelId(), | |||
study.getDiscordRoleId(), | |||
study.getMentor().getId()); | |||
study.getMentor().getId(), |
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.
studyV2Repository.findFetchAll 매서드만 멘토 조인 추가했어요
Job Summary for GradleCheck Style and Test to Develop :: build-test
|
Job Summary for GradleCheck Style and Test to Develop :: build-test
|
🌱 관련 이슈
📌 작업 내용 및 특이사항
📝 참고사항
📚 기타
Summary by CodeRabbit