chore: add config, prisma schema and client (Prisma 7 adapter)

This commit is contained in:
2026-08-10 14:23:31 +02:00
parent df3b6dc8c9
commit 28159d0a4a
6 changed files with 127 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mysql"
}
model Download {
id String @id @default(cuid())
uuid String @unique @default(uuid())
url String @db.Text
status Status @default(PENDING)
format String
quality String
subtitles Boolean @default(false)
extraArgs String? @db.Text
filePath String? @db.Text
fileName String?
fileSize BigInt?
errorMsg String? @db.Text
ipAddress String
submittedAt DateTime @default(now())
startedAt DateTime?
completedAt DateTime?
deletedAt DateTime?
tokens DownloadToken[]
}
model DownloadToken {
id String @id @default(cuid())
download Download @relation(fields: [downloadId], references: [id])
downloadId String
token String @unique @default(uuid())
expiresAt DateTime
usedAt DateTime?
createdAt DateTime @default(now())
}
enum Status {
PENDING
PROCESSING
DONE
FAILED
FILE_DELETED
}