From 3b9d9a7a8aa66138a1e7d12e60d566dd299cc4d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=B8=85?= <2944435683> Date: Thu, 26 Mar 2026 00:30:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E6=A8=A1=E5=9E=8B=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- env/.env.dev | 2 +- src/lib/initDB.ts | 1 + src/routes/production/getFlowData.ts | 1 - src/routes/project/addProject.ts | 4 +++- src/routes/project/editProject.ts | 4 +++- src/types/database.d.ts | 3 ++- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/env/.env.dev b/env/.env.dev index 5b6dc86..584000d 100644 --- a/env/.env.dev +++ b/env/.env.dev @@ -1,4 +1,4 @@ NODE_ENV=dev PORT=10588 -OSSURL=http://192.168.0.74:10588/ +OSSURL=http://127.0.0.1:10588/ diff --git a/src/lib/initDB.ts b/src/lib/initDB.ts index f2b7a7a..b1e22c1 100644 --- a/src/lib/initDB.ts +++ b/src/lib/initDB.ts @@ -28,6 +28,7 @@ export default async (knex: Knex, forceInit: boolean = false): Promise => builder: (table) => { table.integer("id"); table.string("projectType"); + table.string("model"); table.text("name"); table.text("intro"); table.text("type"); diff --git a/src/routes/production/getFlowData.ts b/src/routes/production/getFlowData.ts index bd8733b..183a26a 100644 --- a/src/routes/production/getFlowData.ts +++ b/src/routes/production/getFlowData.ts @@ -38,7 +38,6 @@ export default router.post( .where("o_assets.projectId", projectId) .where("o_assets.id", "in", assetIds) .whereNotNull("o_assets.assetsId"); - console.log("%c Line:35 🥚 childAssetsData", "background:#f5ce50", childAssetsData); if (!sqlData) { const flowData: FlowData = { diff --git a/src/routes/project/addProject.ts b/src/routes/project/addProject.ts index 9a8f597..d3f33c3 100644 --- a/src/routes/project/addProject.ts +++ b/src/routes/project/addProject.ts @@ -15,9 +15,10 @@ export default router.post( type: z.string(), artStyle: z.string(), videoRatio: z.string(), + model: z.string(), }), async (req, res) => { - const { projectType, name, intro, type, artStyle, videoRatio } = req.body; + const { projectType, name, intro, type, artStyle, videoRatio, model } = req.body; await u.db("o_project").insert({ projectType, @@ -27,6 +28,7 @@ export default router.post( artStyle, videoRatio, userId: 1, + model, createTime: Date.now(), }); diff --git a/src/routes/project/editProject.ts b/src/routes/project/editProject.ts index cafcb5e..64f224f 100644 --- a/src/routes/project/editProject.ts +++ b/src/routes/project/editProject.ts @@ -15,9 +15,10 @@ export default router.post( type: z.string(), artStyle: z.string(), videoRatio: z.string(), + model: z.string(), }), async (req, res) => { - const { id, name, intro, type, artStyle, videoRatio } = req.body; + const { id, name, intro, type, artStyle, videoRatio, model } = req.body; await u.db("o_project").where("id", id).update({ name, @@ -25,6 +26,7 @@ export default router.post( type, artStyle, videoRatio, + model, }); res.status(200).send(success({ message: "新增项目成功" })); diff --git a/src/types/database.d.ts b/src/types/database.d.ts index 6aef2aa..69946ae 100644 --- a/src/types/database.d.ts +++ b/src/types/database.d.ts @@ -1,4 +1,4 @@ -// @db-hash a3673cf3a1d1c9cbf22ae3cfff196a71 +// @db-hash 2b2f9f6242d2d20e89412ba5117415df //该文件由脚本自动生成,请勿手动修改 export interface memories { @@ -109,6 +109,7 @@ export interface o_project { 'createTime'?: number | null; 'id'?: number | null; 'intro'?: string | null; + 'model'?: string | null; 'name'?: string | null; 'projectType'?: string | null; 'type'?: string | null;