mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-17 23:12:23 +00:00
feat(prisma): add Testcase and TestcaseData models with relation to Problem
This commit is contained in:
parent
0f71444f9f
commit
521a185d7c
@ -54,6 +54,7 @@ model Problem {
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
templates Template[]
|
||||
testcases Testcase[]
|
||||
|
||||
@@index([userId])
|
||||
@@index([difficulty])
|
||||
@ -127,6 +128,21 @@ model JudgeResult {
|
||||
memoryUsage Int?
|
||||
}
|
||||
|
||||
model Testcase {
|
||||
id String @id @default(cuid())
|
||||
problemId String
|
||||
problem Problem @relation(fields: [problemId], references: [id], onDelete: Cascade)
|
||||
data TestcaseData[]
|
||||
}
|
||||
|
||||
model TestcaseData {
|
||||
id String @id @default(cuid())
|
||||
label String
|
||||
value String
|
||||
testcaseId String
|
||||
testcase Testcase @relation(fields: [testcaseId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
model Account {
|
||||
userId String
|
||||
type String
|
||||
|
Loading…
Reference in New Issue
Block a user