1
0
mirror of https://github.com/Fayorg/calendrier-avant.git synced 2026-05-27 17:18:38 +02:00

fix: removed unused database fields & fix prisma errors

This commit is contained in:
2023-12-20 10:20:21 +01:00
parent da3a9df402
commit b47b59f4cd
5 changed files with 12 additions and 23 deletions

View File

@@ -14,27 +14,25 @@ model Users {
firstName String
lastName String
isTeacher Boolean @default(false)
isAdmin Boolean @default(false)
createdAt DateTime @default(now())
grades Grade[]
test Test?
}
model Test {
id Int @id @default(autoincrement())
testOfId Int @unique
testOn DateTime @db.Date
createdAt DateTime @default(now())
testOf Users @relation(fields: [testOfId], references: [id])
grades Grade[]
isActive Boolean @default(false)
isPassed Boolean @default(false)
teacherGrade Float?
id Int @id @default(autoincrement())
testOfId Int @unique
testOn DateTime @db.Date
createdAt DateTime @default(now())
testOf Users @relation(fields: [testOfId], references: [id])
grades Grade[]
isActive Boolean @default(false)
}
model Grade {
id Int @id @default(autoincrement())
userId Int
note String?
createdAt DateTime @default(now())
grade Float
testId Int