mpp-server-dev2/prisma/schema.prisma

47 lines
1.2 KiB
Plaintext

// 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"
binaryTargets = ["native", "debian-openssl-3.0.x"]
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model User {
id String @id @unique @map("_id")
name String @default("Anonymous")
color String @default("#ffffff")
flags String @default("{}") // JSON flags object
tag String? // JSON tag
tokens String @default("[]") // JSON tokens
group String @default("default") // Permission group
}
model ChatHistory {
id String @id @unique @map("_id")
messages String @default("[]") // JSON messages
}
model Channel {
id String @id @unique @map("_id")
settings String @default("{}") // JSON channel settings
forceload Boolean @default(false) // Whether the channel is forceloaded
flags String @default("{}") // JSON flags object
}
model Role {
id Int @id @unique @default(autoincrement())
userId String
roleId String
}
model RolePermission {
id Int @id @unique @default(autoincrement())
roleId String
permission String
}