2023-10-16 16:09:46 +02:00
|
|
|
// This is your Prisma schema file,
|
|
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
|
|
|
|
generator client {
|
2023-12-02 06:44:43 +01:00
|
|
|
provider = "prisma-client-js"
|
2023-12-02 06:45:31 +01:00
|
|
|
binaryTargets = ["native", "debian-openssl-3.0.x"]
|
2023-10-16 16:09:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
datasource db {
|
|
|
|
provider = "postgresql"
|
|
|
|
url = env("DATABASE_URL")
|
|
|
|
}
|
2023-10-27 20:52:54 +02:00
|
|
|
|
|
|
|
model User {
|
|
|
|
id String @id @unique
|
|
|
|
name String
|
|
|
|
platformId String
|
|
|
|
platform String
|
|
|
|
Inventory Inventory[]
|
2023-11-08 09:17:42 +01:00
|
|
|
role Role
|
2023-10-27 20:52:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
model Inventory {
|
2023-12-02 22:54:39 +01:00
|
|
|
id Int @id @unique @default(autoincrement())
|
|
|
|
userId String @unique
|
|
|
|
user User @relation(fields: [userId], references: [id])
|
|
|
|
items Json
|
|
|
|
balance Float @default(0)
|
2023-10-27 20:52:54 +02:00
|
|
|
}
|
2023-11-08 09:17:42 +01:00
|
|
|
|
|
|
|
enum Role {
|
|
|
|
NONE
|
|
|
|
MODERATOR
|
|
|
|
ADMINISTRATOR
|
|
|
|
OWNER
|
|
|
|
}
|