bw-hspc-contest-env/web/prisma/schema.prisma

38 lines
729 B
Plaintext
Raw Normal View History

2023-04-27 22:26:54 -04:00
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
2023-04-28 13:42:16 -04:00
id Int @id @default(autoincrement())
username String @unique
2023-04-27 22:26:54 -04:00
password String
2023-04-28 13:42:16 -04:00
sessions Session[]
}
model Session {
token String @id
createdAt DateTime @default(now())
user User @relation(fields: [userId], references: [id])
userId Int
2023-04-27 22:26:54 -04:00
}
2023-04-28 10:30:46 -04:00
enum SubmissionState {
InReview
Correct
Incorrect
}
model Submission {
2023-04-28 15:01:03 -04:00
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
state SubmissionState
expectedOutput String
actualOutput String
message String?
2023-04-28 10:30:46 -04:00
}