mirror of
https://github.com/YuzuZensai/Minikura.git
synced 2026-01-30 12:22:39 +00:00
65 lines
1.6 KiB
Plaintext
65 lines
1.6 KiB
Plaintext
// This is your Prisma schema file,
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
|
|
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
previewFeatures = ["omitApi"]
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
enum ServerType {
|
|
STATEFUL
|
|
STATELESS
|
|
}
|
|
|
|
model ReverseProxyServer {
|
|
id String @id @default(cuid())
|
|
name String @unique
|
|
description String?
|
|
api_key String @unique
|
|
address String
|
|
port Int
|
|
created_at DateTime @default(now())
|
|
updated_at DateTime @updatedAt
|
|
}
|
|
|
|
model Server {
|
|
id String @id @default(cuid())
|
|
name String @unique
|
|
description String?
|
|
address String
|
|
port Int
|
|
type ServerType
|
|
api_key String @unique
|
|
join_priority Int?
|
|
created_at DateTime @default(now())
|
|
updated_at DateTime @updatedAt
|
|
}
|
|
|
|
model User {
|
|
id String @id @default(cuid())
|
|
username String @unique
|
|
password String
|
|
sessions Session[]
|
|
created_at DateTime @default(now())
|
|
updated_at DateTime @updatedAt
|
|
}
|
|
|
|
model Session {
|
|
id String @id @default(cuid())
|
|
token String @unique
|
|
user_id String
|
|
user User @relation(fields: [user_id], references: [id])
|
|
revoked Boolean @default(false)
|
|
expires_at DateTime
|
|
created_at DateTime @default(now())
|
|
updated_at DateTime @updatedAt
|
|
}
|