feat: add progress indication for long downloads

This commit is contained in:
Vasily Zubarev
2025-05-19 16:29:04 +02:00
parent d2ef3a088a
commit 90a2411960
10 changed files with 404 additions and 30 deletions

View File

@@ -39,6 +39,7 @@ model User {
accounts Account[]
sessions Session[]
appData AppData[]
progress Progress[]
@@map("users")
}
@@ -219,3 +220,17 @@ model AppData {
@@unique([userId, app])
@@map("app_data")
}
model Progress {
id String @id @default(uuid()) @db.Uuid
userId String @map("user_id") @db.Uuid
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
type String
data Json?
current Int @default(0)
total Int @default(0)
createdAt DateTime @default(now()) @map("created_at")
@@index([userId])
@@map("progress")
}