44 lines
1.8 KiB
Plaintext
44 lines
1.8 KiB
Plaintext
datasource db {
|
|
provider = "mysql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
enum JobStatus {
|
|
pending
|
|
processing
|
|
done
|
|
failed
|
|
}
|
|
|
|
model ConversionJob {
|
|
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
uuid String @unique @db.Char(36)
|
|
status JobStatus @default(pending)
|
|
family String @db.VarChar(32)
|
|
sourceFormat String @map("source_format") @db.VarChar(16)
|
|
targetFormat String @map("target_format") @db.VarChar(16)
|
|
originalFilename String @map("original_filename") @db.VarChar(255)
|
|
inputPath String @map("input_path") @db.VarChar(255)
|
|
outputPath String? @map("output_path") @db.VarChar(255)
|
|
inputMimeType String @map("input_mime_type") @db.VarChar(128)
|
|
outputMimeType String? @map("output_mime_type") @db.VarChar(128)
|
|
inputSizeBytes Int @map("input_size_bytes") @db.UnsignedInt
|
|
outputSizeBytes Int? @map("output_size_bytes") @db.UnsignedInt
|
|
quality Int? @db.UnsignedSmallInt
|
|
conversionDurationSeconds Decimal? @map("conversion_duration_seconds") @db.Decimal(10, 3)
|
|
errorMessage String? @map("error_message") @db.VarChar(255)
|
|
errorLog String? @map("error_log") @db.Text
|
|
createdAt DateTime @default(now()) @map("created_at")
|
|
updatedAt DateTime @default(now()) @updatedAt @map("updated_at")
|
|
expiresAt DateTime @map("expires_at")
|
|
cleanedAt DateTime? @map("cleaned_at")
|
|
|
|
@@index([status])
|
|
@@index([expiresAt])
|
|
@@map("conversion_jobs")
|
|
}
|