mirror of
https://github.com/cfngc4594/monaco-editor-lsp-next.git
synced 2025-05-18 15:26:36 +00:00
40 lines
690 B
Plaintext
40 lines
690 B
Plaintext
|
generator client {
|
||
|
provider = "prisma-client-js"
|
||
|
}
|
||
|
|
||
|
datasource db {
|
||
|
provider = "postgresql"
|
||
|
url = env("DATABASE_URL")
|
||
|
}
|
||
|
|
||
|
enum Role {
|
||
|
ADMIN
|
||
|
TEACHER
|
||
|
STUDENT
|
||
|
GUEST
|
||
|
}
|
||
|
|
||
|
model User {
|
||
|
id Int @id @default(autoincrement())
|
||
|
name String @unique
|
||
|
email String @unique
|
||
|
role Role @default(GUEST)
|
||
|
problems Problem[]
|
||
|
}
|
||
|
|
||
|
enum Difficulty {
|
||
|
EASY
|
||
|
MEDIUM
|
||
|
HARD
|
||
|
}
|
||
|
|
||
|
model Problem {
|
||
|
id Int @id @default(autoincrement())
|
||
|
title String
|
||
|
content String
|
||
|
difficulty Difficulty @default(EASY)
|
||
|
published Boolean @default(false)
|
||
|
authorId Int
|
||
|
author User @relation(fields: [authorId], references: [id])
|
||
|
}
|