feat(wordcloud): WordCloudJob 模型/迁移 + 词云生成与轮询适配器
This commit is contained in:
@@ -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_id(POST /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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user