fishing-api/prisma/schema.prisma

48 lines
906 B
Plaintext
Raw Normal View History

2024-02-15 02:01:36 +01:00
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
2024-02-16 04:02:39 +01:00
id String @id
name String
color String
2024-02-15 09:47:35 +01:00
inventory Inventory @relation(fields: [inventoryId], references: [id])
inventoryId Int @unique
}
model Inventory {
2024-02-22 20:46:45 +01:00
id Int @id @default(autoincrement())
balance Int @default(0)
location String @default("pond")
2024-02-16 04:02:39 +01:00
items Json @default("[]")
fishSack Json @default("[]")
pokemon Json @default("[]")
2024-02-22 20:46:45 +01:00
user User?
2024-02-15 09:47:35 +01:00
}
model AuthToken {
id Int @id @default(autoincrement())
token String @unique
2024-02-15 02:01:36 +01:00
}
2024-02-22 22:42:02 +01:00
model LocationObjectStorage {
id String @id
objects Json @default("[]")
}
2024-02-23 02:27:51 +01:00
model KeyValueStore {
id Int @id @default(0)
json Json @default("{}")
}