-
Notifications
You must be signed in to change notification settings - Fork 8
fix: 멘토 지원서 승인 시 유저 Role 을 Mentor로 승격 #639
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
Open
sukangpunch
wants to merge
7
commits into
solid-connection:develop
Choose a base branch
from
sukangpunch:fix/636-change-role-to-mentor-after-approval
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
faba35c
fix: 멘토 지원서 승인 시 유저 Role 을 Mentor로 승격
sukangpunch ca98121
fix: 멘토 지원서 승인 시 멘토 생성
sukangpunch 0c380d1
fix: 멘토의 introduction, passTip null 허용하도록 수정
sukangpunch 99b64a1
fix: 사용하지 않는 멘토 생성 api 제거
sukangpunch 828f2a5
feat: 멘토 지원서 승인 예외처리 추가
sukangpunch 3d459bc
refactor: Mentor 생성 시 null 전달 제거
sukangpunch 61faa18
refactor: 멘토 지원서 승낙 시, 검증 후 승격 및 멘토 생성
sukangpunch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
20 changes: 0 additions & 20 deletions
20
src/main/java/com/example/solidconnection/mentor/dto/MentorMyPageCreateRequest.java
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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
5 changes: 5 additions & 0 deletions
5
src/main/resources/db/migration/V44__modify_mentor_introduction_pass_tip_nullable.sql
This file contains hidden or 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,5 @@ | ||
| ALTER TABLE mentor | ||
| MODIFY introduction VARCHAR(1000) NULL; | ||
|
|
||
| ALTER TABLE mentor | ||
| MODIFY pass_tip VARCHAR(1000) NULL; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: solid-connection/solid-connect-server
Length of output: 1469
🏁 Script executed:
Repository: solid-connection/solid-connect-server
Length of output: 2555
🏁 Script executed:
Repository: solid-connection/solid-connect-server
Length of output: 150
🏁 Script executed:
Repository: solid-connection/solid-connect-server
Length of output: 148
🏁 Script executed:
# Mentor 엔티티 파일 확인 cat -n ./src/main/java/com/example/solidconnection/mentor/domain/Mentor.javaRepository: solid-connection/solid-connect-server
Length of output: 3974
🏁 Script executed:
# V19 마이그레이션 파일 (Mentor 테이블 생성) 확인 cat -n ./src/main/resources/db/migration/V19__create_mentor_related_tables.sqlRepository: solid-connection/solid-connect-server
Length of output: 2317
🏁 Script executed:
# V26 마이그레이션 파일 (term column 추가) 확인 cat -n ./src/main/resources/db/migration/V26__add_term_column_to_mentor.sqlRepository: solid-connection/solid-connect-server
Length of output: 155
멘토 중복 생성을 방지하기 위해 데이터베이스 레벨 유니크 제약을 추가하세요.
검증 결과, 현재 코드는 다음과 같은 상황입니다:
애플리케이션 레벨 검증
existsBySiteUserId()체크로 비즈니스 규칙을 지키고 있습니다.데이터베이스 레벨 보호 부재 (권장 개선)
@Table(uniqueConstraints) 정의가 없습니다.권장사항
ALTER TABLE mentor ADD CONSTRAINT uk_mentor_site_user_id UNIQUE (site_user_id);추가@Table(uniqueConstraints =@UniqueConstraint(columnNames = "siteUserId"))추가어드민 전용 기능이라 동시 호출 가능성은 낮지만, 데이터 무결성을 위해 DB 레벨 제약을 추가하면 더욱 안전합니다.
🤖 Prompt for AI Agents