feat(jobs): 增加后台任务运行时
This commit is contained in:
@@ -423,6 +423,25 @@ model AiLog {
|
||||
@@map("ai_logs")
|
||||
}
|
||||
|
||||
model BackgroundJob {
|
||||
id String @id @default(cuid())
|
||||
type String
|
||||
status String @default("queued")
|
||||
dedupeKey String? @map("dedupe_key")
|
||||
payload Json @default("{}")
|
||||
attempts Int @default(0)
|
||||
maxAttempts Int @default(3) @map("max_attempts")
|
||||
availableAt DateTime @default(now()) @map("available_at")
|
||||
lockedBy String? @map("locked_by")
|
||||
lockedUntil DateTime? @map("locked_until")
|
||||
lastError String? @map("last_error")
|
||||
completedAt DateTime? @map("completed_at")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@map("background_jobs")
|
||||
}
|
||||
|
||||
model XiaobaoRiskSummary {
|
||||
versionId String @id @map("version_id")
|
||||
riskLevel String @map("risk_level")
|
||||
|
||||
Reference in New Issue
Block a user