mirror of
https://github.com/YuzuZensai/Minikura.git
synced 2026-01-31 14:57:49 +00:00
✨ feat!: update schema
This commit is contained in:
@@ -16,23 +16,48 @@ datasource db {
|
|||||||
enum ServerType {
|
enum ServerType {
|
||||||
STATEFUL
|
STATEFUL
|
||||||
STATELESS
|
STATELESS
|
||||||
REVERSE_PROXY
|
}
|
||||||
|
|
||||||
|
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 {
|
model Server {
|
||||||
id String @id @default(cuid())
|
id String @id @default(cuid())
|
||||||
name String @unique
|
name String @unique
|
||||||
address String
|
description String?
|
||||||
port Int
|
address String
|
||||||
type ServerType
|
port Int
|
||||||
createdAt DateTime @default(now())
|
type ServerType
|
||||||
updatedAt DateTime @updatedAt
|
api_key String @unique
|
||||||
|
join_priority Int?
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
updated_at DateTime @updatedAt
|
||||||
}
|
}
|
||||||
|
|
||||||
model User {
|
model User {
|
||||||
id String @id @default(cuid())
|
id String @id @default(cuid())
|
||||||
username String @unique
|
username String @unique
|
||||||
password String
|
password String
|
||||||
createdAt DateTime @default(now())
|
sessions Session[]
|
||||||
updatedAt DateTime @updatedAt
|
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
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user