Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 8
refactor: Community 도메인 제외 연관관계 삭제#363
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
b6037abdf1014932cb72f3ca8f4e2938a799c59985541fed75cf0660f24495e2bb6e95d3c9b0ecfa18ebfbd6c97File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -7,12 +7,10 @@ | ||
| 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.Index; | ||
| import jakarta.persistence.ManyToOne; | ||
| import jakarta.persistence.Table; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
| @@ -75,15 +73,15 @@ public class Application { | ||
| @Column(name = "third_choice_university_info_for_apply_id") | ||
| private Long thirdChoiceUnivApplyInfoId; | ||
| @ManyToOne(fetch = FetchType.LAZY) | ||
| private SiteUser siteUser; | ||
| @Column(name = "site_user_id") | ||
| private long siteUserId; | ||
nayonsoso marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| public Application( | ||
| SiteUser siteUser, | ||
| Gpa gpa, | ||
| LanguageTest languageTest, | ||
| String term) { | ||
| this.siteUser = siteUser; | ||
| this.siteUserId = siteUser.getId(); | ||
| this.gpa = gpa; | ||
| this.languageTest = languageTest; | ||
| this.term = term; | ||
| @@ -101,7 +99,7 @@ public Application( | ||
| Long secondChoiceUnivApplyInfoId, | ||
| Long thirdChoiceUnivApplyInfoId, | ||
| String nicknameForApply) { | ||
| this.siteUser = siteUser; | ||
| this.siteUserId = siteUser.getId(); | ||
| this.gpa = gpa; | ||
| this.languageTest = languageTest; | ||
| this.term = term; | ||
| @@ -122,7 +120,7 @@ public Application( | ||
| Long secondChoiceUnivApplyInfoId, | ||
| Long thirdChoiceUnivApplyInfoId, | ||
| String nicknameForApply) { | ||
| this.siteUser = siteUser; | ||
| this.siteUserId = siteUser.getId(); | ||
| this.gpa = gpa; | ||
| this.languageTest = languageTest; | ||
| this.term = term; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,8 @@ | ||
| package com.example.solidconnection.location.country.domain; | ||
| import com.example.solidconnection.location.region.domain.Region; | ||
| import jakarta.persistence.Column; | ||
| import jakarta.persistence.Entity; | ||
| import jakarta.persistence.Id; | ||
| import jakarta.persistence.ManyToOne; | ||
| import lombok.AccessLevel; | ||
| import lombok.EqualsAndHashCode; | ||
| import lombok.Getter; | ||
| @@ -23,12 +21,12 @@ public class Country { | ||
| @Column(nullable = false, length = 100) | ||
Gyuhyeok99 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| private String koreanName; | ||
| @ManyToOne | ||
| private Region region; | ||
| @Column(name="region_code") | ||
| private String regionCode; | ||
| public Country(String code, String koreanName, Region region) { | ||
| public Country(String code, String koreanName, String regionCode) { | ||
| this.code = code; | ||
| this.koreanName = koreanName; | ||
| this.region = region; | ||
| this.regionCode = regionCode; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,11 @@ | ||
| package com.example.solidconnection.location.country.repository; | ||
| import com.example.solidconnection.location.country.domain.InterestedCountry; | ||
| import com.example.solidconnection.siteuser.domain.SiteUser; | ||
| import org.springframework.data.jpa.repository.JpaRepository; | ||
| import java.util.List; | ||
| public interface InterestedCountryRepository extends JpaRepository<InterestedCountry, Long> { | ||
| List<InterestedCountry> findAllBySiteUser(SiteUser siteUser); | ||
| List<InterestedCountry> findAllBySiteUserId(long siteUserId); | ||
Gyuhyeok99 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -8,5 +8,5 @@ | ||
| public interface InterestedRegionRepository extends JpaRepository<InterestedRegion, Long> { | ||
| List<InterestedRegion> findAllBySiteUser(SiteUser siteUser); | ||
| List<InterestedRegion> findAllBySiteUserId(long siteUserId); | ||
Gyuhyeok99 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -12,7 +12,6 @@ | ||
| import jakarta.persistence.GeneratedValue; | ||
| import jakarta.persistence.GenerationType; | ||
| import jakarta.persistence.Id; | ||
| import jakarta.persistence.ManyToOne; | ||
| import lombok.EqualsAndHashCode; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
| @@ -38,24 +37,15 @@ public class GpaScore extends BaseEntity { | ||
Gyuhyeok99 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| private String rejectedReason; | ||
| @ManyToOne | ||
| private SiteUser siteUser; | ||
| private long siteUserId; | ||
| public GpaScore(Gpa gpa, SiteUser siteUser) { | ||
| this.gpa = gpa; | ||
| this.siteUser = siteUser; | ||
| this.siteUserId = siteUser.getId(); | ||
| this.verifyStatus = VerifyStatus.PENDING; | ||
| this.rejectedReason = null; | ||
| } | ||
| public void setSiteUser(SiteUser siteUser) { | ||
| if (this.siteUser != null) { | ||
| this.siteUser.getGpaScoreList().remove(this); | ||
| } | ||
| this.siteUser = siteUser; | ||
| siteUser.getGpaScoreList().add(this); | ||
| } | ||
nayonsoso marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| public void updateGpaScore(Gpa gpa, VerifyStatus verifyStatus, String rejectedReason) { | ||
| this.gpa = gpa; | ||
| this.verifyStatus = verifyStatus; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -12,7 +12,6 @@ | ||
| import jakarta.persistence.GeneratedValue; | ||
| import jakarta.persistence.GenerationType; | ||
| import jakarta.persistence.Id; | ||
| import jakarta.persistence.ManyToOne; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
| @@ -38,21 +37,12 @@ public class LanguageTestScore extends BaseEntity { | ||
Gyuhyeok99 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| private String rejectedReason; | ||
| @ManyToOne | ||
| private SiteUser siteUser; | ||
| private long siteUserId; | ||
| public LanguageTestScore(LanguageTest languageTest, SiteUser siteUser) { | ||
| this.languageTest = languageTest; | ||
| this.verifyStatus = VerifyStatus.PENDING; | ||
| this.siteUser = siteUser; | ||
| } | ||
| public void setSiteUser(SiteUser siteUser) { | ||
| if (this.siteUser != null) { | ||
| this.siteUser.getLanguageTestScoreList().remove(this); | ||
| } | ||
| this.siteUser = siteUser; | ||
| siteUser.getLanguageTestScoreList().add(this); | ||
| this.siteUserId = siteUser.getId(); | ||
| } | ||
| public void updateLanguageTestScore(LanguageTest languageTest, VerifyStatus verifyStatus, String rejectedReason) { | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.