Some checks failed
Deploy with Docker Compose / deploy (push) Has been cancelled
- Introduce provider abstraction layer (IMediaProvider, KomgaProvider, StripstreamProvider) - Add Stripstream Librarian as second media provider with full feature parity - Migrate all pages and components from direct Komga services to provider factory - Remove dead service code (BaseApiService, HomeService, LibraryService, SearchService, TestService) - Fix library/series page-based pagination for both providers (Komga 0-indexed, Stripstream 1-indexed) - Fix unread filter and search on library page for both providers - Fix read progress display for Stripstream (reading_status mapping) - Fix series read status (books_read_count) for Stripstream - Add global search with series results for Stripstream (series_hits from Meilisearch) - Fix thumbnail proxy to return 404 gracefully instead of JSON on upstream error - Replace duration-based cache debug detection with x-nextjs-cache header Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
89 lines
2.2 KiB
Plaintext
89 lines
2.2 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)
|
|
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")
|
|
}
|