-
Notifications
You must be signed in to change notification settings - Fork 8
feat: 멘토 관련 엔티티 추가 #348
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
Merged
nayonsoso
merged 10 commits into
solid-connection:develop
from
nayonsoso:feat/347-add-mentor-related-entities
Jul 1, 2025
Merged
feat: 멘토 관련 엔티티 추가 #348
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
be7ad65
chore: flyway 스크립트 추가
nayonsoso 91fec74
feat: 멘토 관련 엔티티 추가
nayonsoso e222621
refactor: VerifyStatus 위치 변경
nayonsoso 5a9ec66
refactor: 명시하지 않아도 될 AccessLevel.PUBLIC 옵션 제거
nayonsoso ce73eb3
refactor: Channel 엔티티에 유티크 제약조건 이름 명시
nayonsoso c9c1e3b
refactor: 엔티티에서 컬럼명 매핑하는 방식 통일
nayonsoso 60a5053
style: enum 컨벤션에 맞게 수정
nayonsoso 30b9a6c
refactor: 논의된 내용대로 연관관계 설정
nayonsoso 753168d
refactor: 승인 상태 컬럼의 default 값 설정
nayonsoso 2398d3f
chore: flyway 스크립트 이름 변경
nayonsoso 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
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/main/java/com/example/solidconnection/admin/dto/GpaScoreResponse.java
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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/example/solidconnection/admin/dto/GpaScoreStatusResponse.java
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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/example/solidconnection/admin/dto/GpaScoreUpdateRequest.java
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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/example/solidconnection/admin/dto/LanguageTestScoreResponse.java
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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/example/solidconnection/admin/dto/LanguageTestScoreStatusResponse.java
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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/example/solidconnection/admin/dto/LanguageTestScoreUpdateRequest.java
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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/example/solidconnection/admin/dto/ScoreSearchCondition.java
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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/example/solidconnection/admin/dto/ScoreUpdateRequest.java
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
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: 0 additions & 5 deletions
5
src/main/java/com/example/solidconnection/application/domain/VerifyStatus.java
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
.../java/com/example/solidconnection/application/dto/validation/RejectedReasonValidator.java
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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/example/solidconnection/application/repository/ApplicationRepository.java
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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/example/solidconnection/application/service/ApplicationQueryService.java
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
2 changes: 1 addition & 1 deletion
2
...in/java/com/example/solidconnection/application/service/ApplicationSubmissionService.java
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
9 changes: 9 additions & 0 deletions
9
src/main/java/com/example/solidconnection/common/VerifyStatus.java
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,9 @@ | ||
| package com.example.solidconnection.common; | ||
|
|
||
| public enum VerifyStatus { | ||
|
|
||
| PENDING, | ||
| REJECTED, | ||
| APPROVED, | ||
| ; | ||
| } |
47 changes: 47 additions & 0 deletions
47
src/main/java/com/example/solidconnection/mentor/domain/Channel.java
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,47 @@ | ||
| package com.example.solidconnection.mentor.domain; | ||
|
|
||
| import jakarta.persistence.Column; | ||
| import jakarta.persistence.Entity; | ||
| import jakarta.persistence.EnumType; | ||
| import jakarta.persistence.Enumerated; | ||
| import jakarta.persistence.FetchType; | ||
| import jakarta.persistence.GeneratedValue; | ||
| import jakarta.persistence.GenerationType; | ||
| import jakarta.persistence.Id; | ||
| import jakarta.persistence.ManyToOne; | ||
| import jakarta.persistence.Table; | ||
| import jakarta.persistence.UniqueConstraint; | ||
| import lombok.AccessLevel; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @Entity | ||
| @Getter | ||
| @AllArgsConstructor | ||
| @NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
| @Table(uniqueConstraints = { | ||
| @UniqueConstraint( | ||
| name = "uk_channel_mentor_id_sequence", | ||
| columnNames = {"mentor_id", "sequence"} | ||
| ) | ||
| }) | ||
| public class Channel { | ||
|
|
||
| @Id | ||
| @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| private Long id; | ||
|
|
||
| @Column | ||
| private int sequence; | ||
|
|
||
| @Enumerated(EnumType.STRING) | ||
| @Column(nullable = false) | ||
| private ChannelType type; | ||
|
|
||
| @Column(nullable = false, length = 500) | ||
| private String url; | ||
|
|
||
| @ManyToOne(fetch = FetchType.LAZY) | ||
| private Mentor mentor; | ||
| } | ||
10 changes: 10 additions & 0 deletions
10
src/main/java/com/example/solidconnection/mentor/domain/ChannelType.java
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,10 @@ | ||
| package com.example.solidconnection.mentor.domain; | ||
|
|
||
| public enum ChannelType { | ||
|
|
||
| BLOG, | ||
| INSTAGRAM, | ||
| YOUTUBE, | ||
| BRUNCH, | ||
| ; | ||
| } |
48 changes: 48 additions & 0 deletions
48
src/main/java/com/example/solidconnection/mentor/domain/Mentor.java
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,48 @@ | ||
| package com.example.solidconnection.mentor.domain; | ||
|
|
||
| import jakarta.persistence.CascadeType; | ||
| import jakarta.persistence.Column; | ||
| import jakarta.persistence.Entity; | ||
| import jakarta.persistence.GeneratedValue; | ||
| import jakarta.persistence.GenerationType; | ||
| import jakarta.persistence.Id; | ||
| import jakarta.persistence.OneToMany; | ||
| import lombok.AccessLevel; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| import java.util.ArrayList; | ||
| import java.util.List; | ||
|
|
||
| @Entity | ||
| @Getter | ||
| @AllArgsConstructor | ||
| @NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
| public class Mentor { | ||
|
|
||
| @Id | ||
| @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| private Long id; | ||
|
|
||
| @Column | ||
| private int menteeCount = 0; | ||
|
|
||
| @Column | ||
| private boolean hasBadge = false; | ||
|
|
||
| @Column(length = 1000) | ||
| private String introduction; | ||
|
|
||
| @Column(length = 1000) | ||
| private String passTip; | ||
|
|
||
| @Column | ||
| private long siteUserId; | ||
|
|
||
| @Column | ||
| private long universityId; | ||
nayonsoso marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| @OneToMany(mappedBy = "mentor", cascade = CascadeType.ALL, orphanRemoval = true) | ||
| private List<Channel> channels = new ArrayList<>(); | ||
| } | ||
63 changes: 63 additions & 0 deletions
63
src/main/java/com/example/solidconnection/mentor/domain/Mentoring.java
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,63 @@ | ||
| package com.example.solidconnection.mentor.domain; | ||
|
|
||
| import com.example.solidconnection.common.VerifyStatus; | ||
| import jakarta.persistence.Column; | ||
| import jakarta.persistence.Entity; | ||
| import jakarta.persistence.EntityListeners; | ||
| import jakarta.persistence.EnumType; | ||
| import jakarta.persistence.Enumerated; | ||
| import jakarta.persistence.GeneratedValue; | ||
| import jakarta.persistence.GenerationType; | ||
| import jakarta.persistence.Id; | ||
| import jakarta.persistence.PrePersist; | ||
| import lombok.AccessLevel; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
| import org.hibernate.annotations.DynamicInsert; | ||
| import org.springframework.data.jpa.domain.support.AuditingEntityListener; | ||
|
|
||
| import java.time.ZonedDateTime; | ||
|
|
||
| import static java.time.ZoneOffset.UTC; | ||
| import static java.time.temporal.ChronoUnit.MICROS; | ||
|
|
||
| @Entity | ||
| @Getter | ||
| @EntityListeners(AuditingEntityListener.class) | ||
| @DynamicInsert | ||
| @AllArgsConstructor | ||
| @NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
| public class Mentoring { | ||
whqtker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| @Id | ||
| @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| private Long id; | ||
|
|
||
| @Column(nullable = false) | ||
| private ZonedDateTime createdAt; | ||
|
|
||
| @Column | ||
| private ZonedDateTime confirmedAt; | ||
|
|
||
| @Column | ||
| private ZonedDateTime checkedAt; | ||
|
|
||
| @Column(nullable = false) | ||
| @Enumerated(EnumType.STRING) | ||
| private VerifyStatus verifyStatus = VerifyStatus.PENDING; | ||
|
|
||
| @Column(length = 500) | ||
| private String rejectedReason; | ||
|
|
||
| @Column | ||
| private long mentorId; | ||
|
|
||
| @Column | ||
| private long menteeId; | ||
|
|
||
| @PrePersist | ||
| public void onPrePersist() { | ||
| this.createdAt = ZonedDateTime.now(UTC).truncatedTo(MICROS); // 나노초 6자리 까지만 저장 | ||
| } | ||
nayonsoso marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
2 changes: 1 addition & 1 deletion
2
src/main/java/com/example/solidconnection/score/domain/GpaScore.java
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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/example/solidconnection/score/domain/LanguageTestScore.java
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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/example/solidconnection/score/dto/GpaScoreStatusResponse.java
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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/example/solidconnection/score/dto/LanguageTestScoreStatusResponse.java
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.