diff --git a/src/lib/initDB.ts b/src/lib/initDB.ts index fa16fd6..648ecc8 100644 --- a/src/lib/initDB.ts +++ b/src/lib/initDB.ts @@ -472,7 +472,6 @@ description: 专注于从剧本内容中提取所使用的资产(角色、场 table.text("resolution"); table.text("state"); table.text("errorReason"); - table.text("reason"); table.primary(["id"]); table.unique(["id"]); }, diff --git a/src/routes/assetsGenerate/batchGenerateImageAssets.ts b/src/routes/assetsGenerate/batchGenerateImageAssets.ts index c6e180d..9cd1094 100644 --- a/src/routes/assetsGenerate/batchGenerateImageAssets.ts +++ b/src/routes/assetsGenerate/batchGenerateImageAssets.ts @@ -145,7 +145,7 @@ export default router.post("/", validateFields(requestSchema), async (req, res) await u .db("o_image") .where("id", imageId) - .update({ state: "生成失败", reason: u.error(e).message }); + .update({ state: "生成失败", errorReason: u.error(e).message }); } }), ); diff --git a/src/routes/production/assets/batchGenerateAssetsImage.ts b/src/routes/production/assets/batchGenerateAssetsImage.ts index a1371d0..dd54ac8 100644 --- a/src/routes/production/assets/batchGenerateAssetsImage.ts +++ b/src/routes/production/assets/batchGenerateAssetsImage.ts @@ -116,7 +116,7 @@ export default router.post( await u .db("o_image") .where({ id: imageId }) - .update({ state: "生成失败", reason: u.error(e).message }); + .update({ state: "生成失败", errorReason: u.error(e).message }); return { id: item.id!, state: "生成失败", diff --git a/src/routes/production/assets/pollingImage.ts b/src/routes/production/assets/pollingImage.ts index 7cc5886..041a6dc 100644 --- a/src/routes/production/assets/pollingImage.ts +++ b/src/routes/production/assets/pollingImage.ts @@ -17,7 +17,7 @@ export default router.post( .leftJoin("o_image", "o_assets.imageId", "o_image.id") .whereIn("o_assets.id", ids) .whereNot("o_image.state", "生成中") - .select("o_image.state", "o_assets.id", "o_image.filePath"); + .select("o_image.state", "o_assets.id", "o_image.filePath", "o_image.errorReason"); const result = await Promise.all( data.map(async (item: any) => ({ ...item, diff --git a/src/types/database.d.ts b/src/types/database.d.ts index d9a6285..04139ce 100644 --- a/src/types/database.d.ts +++ b/src/types/database.d.ts @@ -1,4 +1,4 @@ -// @db-hash 6b1f47596dc417ed5691fe156dc2928f +// @db-hash c0d74bd27b3a41b397705c93d1737a3b //该文件由脚本自动生成,请勿手动修改 export interface memories { @@ -197,6 +197,7 @@ export interface o_vendorConfig { 'code'?: string | null; 'createTime'?: number | null; 'description'?: string | null; + 'enableEnglish'?: number | null; 'icon'?: string | null; 'id'?: string; 'inputs'?: string | null; @@ -220,7 +221,7 @@ export interface o_videoTrack { 'prompt'?: string | null; 'reason'?: string | null; 'scriptId'?: number | null; - 'selectVideoId'?: string | null; + 'selectVideoId'?: number | null; 'state'?: string | null; 'videoId'?: number | null; }