88import jakarta .persistence .Entity ;
99import jakarta .persistence .EnumType ;
1010import jakarta .persistence .Enumerated ;
11+ import jakarta .persistence .FetchType ;
1112import jakarta .persistence .GeneratedValue ;
1213import jakarta .persistence .GenerationType ;
1314import jakarta .persistence .Id ;
@@ -51,16 +52,19 @@ public class Application {
5152 @ Column (length = 50 , nullable = false )
5253 private String term ;
5354
54- @ ManyToOne
55+ @ Column (columnDefinition = "TINYINT(1) NOT NULL DEFAULT 0" )
56+ private Boolean isDelete ;
57+
58+ @ ManyToOne (fetch = FetchType .LAZY )
5559 private UniversityInfoForApply firstChoiceUniversity ;
5660
57- @ ManyToOne
61+ @ ManyToOne ( fetch = FetchType . LAZY )
5862 private UniversityInfoForApply secondChoiceUniversity ;
5963
60- @ ManyToOne
64+ @ ManyToOne ( fetch = FetchType . LAZY )
6165 private UniversityInfoForApply thirdChoiceUniversity ;
6266
63- @ ManyToOne
67+ @ ManyToOne ( fetch = FetchType . LAZY )
6468 private SiteUser siteUser ;
6569
6670 public Application (
@@ -76,14 +80,53 @@ public Application(
7680 this .verifyStatus = PENDING ;
7781 }
7882
79- public void updateGpaAndLanguageTest (
83+ public Application (
84+ SiteUser siteUser ,
85+ Gpa gpa ,
86+ LanguageTest languageTest ,
87+ String term ,
88+ Integer updateCount ,
89+ UniversityInfoForApply firstChoiceUniversity ,
90+ UniversityInfoForApply secondChoiceUniversity ,
91+ UniversityInfoForApply thirdChoiceUniversity ,
92+ String nicknameForApply ) {
93+ this .siteUser = siteUser ;
94+ this .gpa = gpa ;
95+ this .languageTest = languageTest ;
96+ this .term = term ;
97+ this .updateCount = updateCount ;
98+ this .firstChoiceUniversity = firstChoiceUniversity ;
99+ this .secondChoiceUniversity = secondChoiceUniversity ;
100+ this .thirdChoiceUniversity = thirdChoiceUniversity ;
101+ this .nicknameForApply = nicknameForApply ;
102+ this .verifyStatus = PENDING ;
103+ }
104+
105+ public Application (
106+ SiteUser siteUser ,
80107 Gpa gpa ,
81- LanguageTest languageTest ) {
108+ LanguageTest languageTest ,
109+ String term ,
110+ UniversityInfoForApply firstChoiceUniversity ,
111+ UniversityInfoForApply secondChoiceUniversity ,
112+ UniversityInfoForApply thirdChoiceUniversity ,
113+ String nicknameForApply ) {
114+ this .siteUser = siteUser ;
82115 this .gpa = gpa ;
83116 this .languageTest = languageTest ;
117+ this .term = term ;
118+ this .updateCount = 0 ;
119+ this .firstChoiceUniversity = firstChoiceUniversity ;
120+ this .secondChoiceUniversity = secondChoiceUniversity ;
121+ this .thirdChoiceUniversity = thirdChoiceUniversity ;
122+ this .nicknameForApply = nicknameForApply ;
84123 this .verifyStatus = PENDING ;
85124 }
86125
126+ public void setIsDeleteTrue () {
127+ this .isDelete = true ;
128+ }
129+
87130 public void updateUniversityChoice (
88131 UniversityInfoForApply firstChoiceUniversity ,
89132 UniversityInfoForApply secondChoiceUniversity ,
0 commit comments