forked from move-fast-and-break-things/aibyss
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.prisma
More file actions
36 lines (32 loc) · 784 Bytes
/
schema.prisma
File metadata and controls
36 lines (32 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
}
model User {
id Int @id @default(autoincrement())
password String
username String @unique
inactive Boolean @default(false)
game_stats GameStats[]
}
model Game {
game_id Int @id @default(autoincrement())
start_time DateTime
end_time DateTime
end_reason String
game_stats GameStats[]
}
model GameStats {
id Int @id @default(autoincrement())
game_id Int
user_id Int
size Float
food_eaten Int
kills Int
deaths Int
user User @relation(fields: [user_id], references: [id])
games Game @relation(fields: [game_id], references: [game_id])
}