mirror of
https://github.com/cfngc4594/monaco-editor-lsp-next.git
synced 2025-05-18 15:26:36 +00:00
feat(prisma): add TestcaseResult model and relations to Submission and Testcase
This commit is contained in:
parent
d64f95b4e7
commit
1c0612372b
@ -141,6 +141,8 @@ model Submission {
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
problem Problem @relation(fields: [problemId], references: [id], onDelete: Cascade)
|
||||
|
||||
TestcaseResult TestcaseResult[]
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
@ -151,16 +153,35 @@ model Testcase {
|
||||
problem Problem @relation(fields: [problemId], references: [id], onDelete: Cascade)
|
||||
data TestcaseData[]
|
||||
expectedOutput String
|
||||
TestcaseResult TestcaseResult[]
|
||||
}
|
||||
|
||||
model TestcaseData {
|
||||
id String @id @default(cuid())
|
||||
index Int
|
||||
label String
|
||||
value String
|
||||
testcaseId String
|
||||
testcase Testcase @relation(fields: [testcaseId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
model TestcaseResult {
|
||||
id String @id @default(cuid())
|
||||
isCorrect Boolean
|
||||
output String
|
||||
|
||||
executionTime Int?
|
||||
memoryUsage Int?
|
||||
|
||||
submissionId String
|
||||
testcaseId String
|
||||
submission Submission @relation(fields: [submissionId], references: [id], onDelete: Cascade)
|
||||
testcase Testcase @relation(fields: [testcaseId], references: [id], onDelete: Cascade)
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model Account {
|
||||
userId String
|
||||
type String
|
||||
|
Loading…
Reference in New Issue
Block a user