From ae36362a39aecc455aa9af4e4321fe11a7188297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=B8=85?= <2944435683> Date: Wed, 1 Apr 2026 22:44:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E7=94=9F=E6=88=90=E8=A7=86?= =?UTF-8?q?=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/cornerScape/getAllAssets.ts | 1 + .../production/workbench/generateVideo.ts | 4 +- src/types/database.d.ts | 58 +++++++------------ 3 files changed, 24 insertions(+), 39 deletions(-) diff --git a/src/routes/cornerScape/getAllAssets.ts b/src/routes/cornerScape/getAllAssets.ts index 83620a1..4fa8712 100644 --- a/src/routes/cornerScape/getAllAssets.ts +++ b/src/routes/cornerScape/getAllAssets.ts @@ -19,6 +19,7 @@ export default router.post( .select("o_assets.*", "o_image.filePath", "o_image.state", "o_image.model", "o_image.resolution", "o_image.errorReason") .where("o_assets.projectId", projectId) .andWhere("o_assets.type", "<>", "clip") + .andWhere("o_assets.assetsId", null) .modify((qb) => { if (type && type.length > 0) qb.whereIn("o_assets.type", type); }) diff --git a/src/routes/production/workbench/generateVideo.ts b/src/routes/production/workbench/generateVideo.ts index 542e279..aae2273 100644 --- a/src/routes/production/workbench/generateVideo.ts +++ b/src/routes/production/workbench/generateVideo.ts @@ -25,7 +25,7 @@ export default router.post( uploadData: z.array( z.object({ id: z.number(), - type: z.string(), + sources: z.string(), }), ), prompt: z.string(), @@ -37,7 +37,7 @@ export default router.post( trackId: z.number(), }), async (req, res) => { - const { scriptId, projectId, prompt, uploadData, model, duration, resolution, audio, mode, trackId } = req.body; + const { scriptId, projectId, prompt, uploadData, model, duration, resolution, audio, mode, trackId } = req.body; //获取生成视频比例 const ratio = await u.db("o_project").select("videoRatio").where("id", projectId).first(); const videoPath = `/${projectId}/video/${uuidv4()}.mp4`; //视频保存路径 diff --git a/src/types/database.d.ts b/src/types/database.d.ts index 741be61..e87673b 100644 --- a/src/types/database.d.ts +++ b/src/types/database.d.ts @@ -1,40 +1,23 @@ -// @db-hash 54f96fd4840bc7be938137276359fa34 +// @db-hash 6a348d086c2b17da9a5120ad4f89f068 //该文件由脚本自动生成,请勿手动修改 -export interface _o_assets_old_20260401 { - 'assetsId'?: number | null; - 'describe'?: string | null; - 'id'?: number; - 'imageId'?: number | null; +export interface _o_vendorConfig_old_20260401 { + 'author'?: string | null; + 'code'?: string | null; + 'createTime'?: number | null; + 'description'?: string | null; + 'icon'?: string | null; + 'id'?: string; + 'inputs'?: string | null; + 'inputValues'?: string | null; + 'models'?: string | null; 'name'?: string | null; +} +export interface _o_videoTrack_old_20260401 { + 'id'?: number; 'projectId'?: number | null; - 'prompt'?: string | null; - 'promptState'?: string | null; - 'remark'?: string | null; 'scriptId'?: number | null; - 'startTime'?: number | null; - 'type'?: string | null; -} -export interface _o_image_old_20260401 { - 'assetsId'?: number | null; - 'filePath'?: string | null; - 'id'?: number; - 'model'?: string | null; - 'reason'?: string | null; - 'resolution'?: string | null; - 'state'?: string | null; - 'type'?: string | null; -} -export interface _o_image_old_20260401_1 { - 'assetsId'?: number | null; - 'errorReason'?: string | null; - 'filePath'?: string | null; - 'id'?: number; - 'model'?: string | null; - 'reason'?: string | null; - 'resolution'?: string | null; - 'state'?: string | null; - 'type'?: string | null; + 'videoId'?: number | null; } export interface memories { 'content': string; @@ -77,6 +60,7 @@ export interface o_artStyle { export interface o_assets { 'assetsId'?: number | null; 'describe'?: string | null; + 'flowId'?: number | null; 'id'?: number; 'imageId'?: number | null; 'name'?: string | null; @@ -106,6 +90,7 @@ export interface o_eventChapter { } export interface o_image { 'assetsId'?: number | null; + 'errorReason'?: string | null; 'filePath'?: string | null; 'id'?: number; 'model'?: string | null; @@ -115,10 +100,8 @@ export interface o_image { 'type'?: string | null; } export interface o_imageFlow { - 'assetsId'?: number | null; 'flowData': string; 'id'?: number; - 'storyboardId'?: number | null; } export interface o_novel { 'chapter'?: string | null; @@ -150,6 +133,7 @@ export interface o_project { 'imageModel'?: string | null; 'imageQuality'?: string | null; 'intro'?: string | null; + 'mode'?: string | null; 'name'?: string | null; 'projectType'?: string | null; 'type'?: string | null; @@ -231,6 +215,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; @@ -260,9 +245,8 @@ export interface o_videoTrack { } export interface DB { - "_o_assets_old_20260401": _o_assets_old_20260401; - "_o_image_old_20260401": _o_image_old_20260401; - "_o_image_old_20260401_1": _o_image_old_20260401_1; + "_o_vendorConfig_old_20260401": _o_vendorConfig_old_20260401; + "_o_videoTrack_old_20260401": _o_videoTrack_old_20260401; "memories": memories; "o_agentDeploy": o_agentDeploy; "o_agentWorkData": o_agentWorkData;