Files
HiveGrid-Wireframes/hivegrid-cloud/prisma/schema/queue.prisma
T

56 lines
1.4 KiB
Plaintext

model QueueFailedJob {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
queueName String
jobName String
jobId String?
attemptsMade Int
attemptsLimit Int?
errorName String
errorMessage String
failedAt DateTime?
@@index([queueName, jobName, failedAt])
@@index([jobId])
@@index([failedAt])
@@unique([queueName, jobName, jobId])
}
enum ExportJobStatus {
PENDING
RUNNING
COMPLETED
FAILED
}
model ExportJob {
id String @id @default(cuid())
tenantId String
requestedByUserId String?
exportType String
format String
status ExportJobStatus @default(PENDING)
requestId String
attemptsMade Int @default(0)
artifactBucket String?
artifactKey String?
rowCount Int?
errorName String?
errorMessage String?
retentionErrorMessage String?
expiresAt DateTime?
deletedAt DateTime?
hardDeletedAt DateTime?
startedAt DateTime?
finishedAt DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([tenantId, status])
@@index([tenantId, createdAt])
@@index([requestId])
@@index([expiresAt])
@@index([status, updatedAt])
}