Files
stripstream/prisma/schema.prisma
Froidefond Julien c5da33d6b2 feat: add anonymous mode toggle to hide reading progress and tracking
Adds a toggleable anonymous mode (eye icon in header) that:
- Stops syncing read progress to the server while reading
- Hides mark as read/unread buttons on book covers and lists
- Hides reading status badges on series and books
- Hides progress bars on series and book covers
- Hides "continue reading" and "continue series" sections on home
- Persists the setting server-side in user preferences (anonymousMode)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 13:35:22 +01:00

90 lines
2.3 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"
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
email String @unique
password String
roles Json @default("[\"ROLE_USER\"]")
authenticated Boolean @default(true)
activeProvider String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
// Relations
config KomgaConfig?
stripstreamConfig StripstreamConfig?
preferences Preferences?
favorites Favorite[]
@@map("users")
}
model KomgaConfig {
id Int @id @default(autoincrement())
userId Int @unique
url String
username String
authHeader String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@map("komgaconfigs")
}
model StripstreamConfig {
id Int @id @default(autoincrement())
userId Int @unique
url String
token String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@map("stripstreamconfigs")
}
model Preferences {
id Int @id @default(autoincrement())
userId Int @unique
showThumbnails Boolean @default(true)
showOnlyUnread Boolean @default(false)
displayMode Json
background Json
readerPrefetchCount Int @default(5)
anonymousMode Boolean @default(false)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@map("preferences")
}
model Favorite {
id Int @id @default(autoincrement())
userId Int
seriesId String
provider String @default("komga")
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@unique([userId, provider, seriesId])
@@index([userId])
@@map("favorites")
}