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;