@@ -51,7 +51,7 @@ model Candidate {
5151model Team {
5252 id String @id @default (uuid () ) @db.VarChar (36 )
5353 group Int @unique @db.Int
54- name String ? @unique @db.VarChar (255 )
54+ name String ? @unique @db.VarChar (255 )
5555 mentorshipId String @map (" mentorship_id " ) @db.VarChar (36 )
5656 leaderId String ? @unique @map (" leader_id " ) @db.VarChar (36 )
5757 topicId String @map (" topic_id " ) @db.VarChar (36 )
@@ -63,6 +63,7 @@ model Team {
6363 candidates Candidate [] @relation (" CandidateToTeam " )
6464 submissions Submission []
6565 reports Report []
66+ presents Present []
6667
6768 @@map (" teams " )
6869}
@@ -172,23 +173,17 @@ model BaremScore {
172173 @@map (" scores " )
173174}
174175
175- // tạo 1 bảng lưu lại thông tin đăng ký thời gian present của ứng viên bao gồm
176- // id
177- // team_id - quan hệ với team
178- // thời gian present thử - json
179- // thời gian present thật - json
176+ model Present {
177+ id String @id @default (uuid () ) @db.VarChar (36 )
178+ teamId String @map (" team_id " ) @db.VarChar (36 )
180179
181- // created_at
182- // updated_at
180+ tentativeSchedule Json @map ( " tentative_schedule " ) @db.Json
181+ finalSchedule Json @map ( " final_schedule " ) @db.Json
183182
184- model Present {
185- id String @id @default (uuid () ) @db.VarChar (36 )
186- teamId String @map (" team_id " ) @db.VarChar (36 )
187- tentativeSchedule String @map (" tentative_schedule " ) @db.Json
188- finalSchedule String @map (" final_schedule " ) @db.Json
189- createdAt DateTime @default (now () ) @map (" created_at " )
190- updatedAt DateTime @updatedAt @map (" updated_at " )
183+ createdAt DateTime @default (now () ) @map (" created_at " )
184+ updatedAt DateTime @updatedAt @map (" updated_at " )
191185
186+ // Quan hệ với model Team
192187 team Team @relation (fields : [teamId ] , references : [id ] )
193188
194189 @@map (" presents " )
0 commit comments