Robin
08/20/2021, 5:13 PMmodel Challenge {
id Int @default(autoincrement()) @id
title String
text String
solution String
points Int
solves Solve[]
}
model Solve {
user User @relation(fields: [userId], references: [id])
userId Int
challenge Challenge @relation(fields: [challengeId], references: [id])
challengeId Int
createdAt DateTime @default(now()) @map(name: "created_at")
@@id([userId, challengeId])
}