bw-hspc-contest-env/web/prisma/schema.prisma
2023-04-28 15:01:03 -04:00

38 lines
729 B
Plaintext

generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
username String @unique
password String
sessions Session[]
}
model Session {
token String @id
createdAt DateTime @default(now())
user User @relation(fields: [userId], references: [id])
userId Int
}
enum SubmissionState {
InReview
Correct
Incorrect
}
model Submission {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
state SubmissionState
expectedOutput String
actualOutput String
message String?
}