mpp-server-dev2/prisma/schema.prisma

47 lines
1.2 KiB
Plaintext
Raw Normal View History

2023-09-07 01:59:44 +02:00
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
2024-02-01 14:40:59 +01:00
provider = "prisma-client-js"
binaryTargets = ["native", "debian-openssl-3.0.x"]
2023-09-07 01:59:44 +02:00
}
datasource db {
2023-09-07 02:02:14 +02:00
provider = "sqlite"
2023-09-07 01:59:44 +02:00
url = env("DATABASE_URL")
}
2023-09-07 02:02:14 +02:00
model User {
2024-09-15 23:11:41 +02:00
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
2023-09-07 02:02:14 +02:00
}
2024-01-31 11:09:25 +01:00
model ChatHistory {
id String @id @unique @map("_id")
messages String @default("[]") // JSON messages
}
model Channel {
2024-09-15 18:41:51 +02:00
id String @id @unique @map("_id")
settings String @default("{}") // JSON channel settings
forceload Boolean @default(false) // Whether the channel is forceloaded
2024-09-15 18:41:51 +02:00
flags String @default("{}") // JSON flags object
}
model Role {
2024-09-15 23:11:41 +02:00
id Int @id @unique @default(autoincrement())
userId String
2024-09-15 18:41:51 +02:00
roleId String
}
model RolePermission {
id Int @id @unique @default(autoincrement())
roleId String
permission String
}