mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-09 06:55:51 +01:00
93 lines
3.0 KiB
Plaintext
93 lines
3.0 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", "linux-musl-openssl-3.0.x", "linux-musl-arm64-openssl-3.0.x"]
|
|
}
|
|
|
|
datasource db {
|
|
provider = "sqlite"
|
|
// NOTE: When using mysql or sqlserver, uncomment the @db.Text annotations in model Account below
|
|
// Further reading:
|
|
// https://next-auth.js.org/adapters/prisma#create-the-prisma-schema
|
|
// https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#string
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
// Necessary for Next auth
|
|
model Account {
|
|
id String @id @default(cuid())
|
|
userId String
|
|
type String
|
|
provider String
|
|
providerAccountId String
|
|
refresh_token String? // @db.Text
|
|
access_token String? // @db.Text
|
|
expires_at Int?
|
|
token_type String?
|
|
scope String?
|
|
id_token String? // @db.Text
|
|
session_state String?
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
|
|
@@unique([provider, providerAccountId])
|
|
}
|
|
|
|
model Session {
|
|
id String @id @default(cuid())
|
|
sessionToken String @unique
|
|
userId String
|
|
expires DateTime
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
}
|
|
|
|
model User {
|
|
id String @id @default(cuid())
|
|
name String?
|
|
email String? @unique
|
|
emailVerified DateTime?
|
|
image String?
|
|
password String?
|
|
salt String?
|
|
isAdmin Boolean @default(false)
|
|
isOwner Boolean @default(false)
|
|
accounts Account[]
|
|
sessions Session[]
|
|
settings UserSettings?
|
|
createdInvites Invite[]
|
|
}
|
|
|
|
model VerificationToken {
|
|
identifier String
|
|
token String @unique
|
|
expires DateTime
|
|
|
|
@@unique([identifier, token])
|
|
}
|
|
|
|
model Invite {
|
|
id String @id @default(cuid())
|
|
token String @unique
|
|
expires DateTime
|
|
createdById String
|
|
createdBy User @relation(fields: [createdById], references: [id], onDelete: Cascade)
|
|
}
|
|
|
|
model UserSettings {
|
|
id String @id @default(cuid())
|
|
userId String
|
|
colorScheme String @default("environment") // environment, light, dark
|
|
language String @default("en")
|
|
defaultBoard String @default("default")
|
|
firstDayOfWeek String @default("monday") // monday, saturnday, sunday
|
|
searchTemplate String @default("https://google.com/search?q=%s")
|
|
openSearchInNewTab Boolean @default(true)
|
|
disablePingPulse Boolean @default(false)
|
|
replacePingWithIcons Boolean @default(false)
|
|
useDebugLanguage Boolean @default(false)
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
|
|
@@unique([userId])
|
|
}
|