mirror of
https://github.com/cfngc4594/monaco-editor-lsp-next.git
synced 2025-05-18 15:26:36 +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
|
userId String
|
||||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||||
templates Template[]
|
templates Template[]
|
||||||
|
testcases Testcase[]
|
||||||
|
|
||||||
@@index([userId])
|
@@index([userId])
|
||||||
@@index([difficulty])
|
@@index([difficulty])
|
||||||
@ -127,6 +128,21 @@ model JudgeResult {
|
|||||||
memoryUsage Int?
|
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 {
|
model Account {
|
||||||
userId String
|
userId String
|
||||||
type String
|
type String
|
||||||
|
Loading…
Reference in New Issue
Block a user