feat(wordcloud): WordCloudJob 模型/迁移 + 词云生成与轮询适配器

This commit is contained in:
2026-08-12 19:08:57 +08:00
parent d47b62c337
commit 8925e83b8f
9 changed files with 1076 additions and 15 deletions
+26
View File
@@ -29,6 +29,7 @@ model User {
designLists DesignList[]
uploads Upload[]
customizations CustomizationTask[]
wordCloudJobs WordCloudJob[]
@@index([phone])
}
@@ -221,3 +222,28 @@ enum CustomizationTaskStatus {
SUCCESS
FAILED
}
// ── 词云任务(R4:小程序交互生成 + 下单 WCD 派单共用)────────────────
model WordCloudJob {
id String @id @default(cuid())
userId String
// wordcloud 侧的外部 job_idPOST /api/jobs 返回);空表示尚未在外部创建
remoteJobId String?
status WordCloudJobStatus @default(QUEUED)
progress Int @default(0)
imageUrl String?
error String?
user User @relation(fields: [userId], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([userId])
}
enum WordCloudJobStatus {
QUEUED
RUNNING
SUCCESS
FAILED
}