mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
feat(prisma): add Template model and EditorLanguage enum to support problem templates and code language options
This commit is contained in:
parent
944c5407bd
commit
8c159e2717
@ -36,4 +36,18 @@ model Problem {
|
|||||||
published Boolean @default(false)
|
published Boolean @default(false)
|
||||||
authorId Int
|
authorId Int
|
||||||
author User @relation(fields: [authorId], references: [id])
|
author User @relation(fields: [authorId], references: [id])
|
||||||
|
Template Template[]
|
||||||
|
}
|
||||||
|
|
||||||
|
enum EditorLanguage {
|
||||||
|
C
|
||||||
|
CPP
|
||||||
|
}
|
||||||
|
|
||||||
|
model Template {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
language EditorLanguage
|
||||||
|
template String
|
||||||
|
problemId Int
|
||||||
|
problem Problem @relation(fields: [problemId], references: [id])
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user