diff options
Diffstat (limited to 'backend/schema.prisma')
| -rw-r--r-- | backend/schema.prisma | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/backend/schema.prisma b/backend/schema.prisma index e5c4039..d3c0588 100644 --- a/backend/schema.prisma +++ b/backend/schema.prisma @@ -23,3 +23,18 @@ model Session { createdAt DateTime @default(now()) expiresAt DateTime } + +model Game { + id Int @id @default(autoincrement()) + name String @unique + scores Score[] +} + +model Score { + id Int @id @default(autoincrement()) + gameId Int + userId Int + data Json // arbitrary data in json format + game Game @relation(fields: [gameId], references: [id]) + user User @relation(fields: [userId], references: [id]) +} |
