diff --git a/src/agents/scriptAgent/tools.ts b/src/agents/scriptAgent/tools.ts index b4abe1b..f6dad91 100644 --- a/src/agents/scriptAgent/tools.ts +++ b/src/agents/scriptAgent/tools.ts @@ -118,6 +118,7 @@ export default (resTool: ResTool, toolsNames?: string[]) => { type: i.type, describe: i.desc, projectId: resTool.data.projectId, + startTime: Date.now(), }); assetId.push(id); } diff --git a/src/lib/initDB.ts b/src/lib/initDB.ts index db6799d..530d42b 100644 --- a/src/lib/initDB.ts +++ b/src/lib/initDB.ts @@ -30,7 +30,8 @@ export default async (knex: Knex, forceInit: boolean = false): Promise => builder: (table) => { table.integer("id"); table.string("projectType"); - table.string("model"); + table.string("imageModel"); + table.string("videoModel"); table.text("name"); table.text("intro"); table.text("type"); diff --git a/src/routes/project/addProject.ts b/src/routes/project/addProject.ts index d3f33c3..65f15d9 100644 --- a/src/routes/project/addProject.ts +++ b/src/routes/project/addProject.ts @@ -15,10 +15,11 @@ export default router.post( type: z.string(), artStyle: z.string(), videoRatio: z.string(), - model: z.string(), + imageModel: z.string(), + videoModel: z.string(), }), async (req, res) => { - const { projectType, name, intro, type, artStyle, videoRatio, model } = req.body; + const { projectType, name, intro, type, artStyle, videoRatio, imageModel, videoModel } = req.body; await u.db("o_project").insert({ projectType, @@ -28,7 +29,8 @@ export default router.post( artStyle, videoRatio, userId: 1, - model, + imageModel, + videoModel, createTime: Date.now(), }); diff --git a/src/routes/project/editProject.ts b/src/routes/project/editProject.ts index 64f224f..eb4fc8e 100644 --- a/src/routes/project/editProject.ts +++ b/src/routes/project/editProject.ts @@ -15,10 +15,11 @@ export default router.post( type: z.string(), artStyle: z.string(), videoRatio: z.string(), - model: z.string(), + imageModel: z.string(), + videoModel: z.string(), }), async (req, res) => { - const { id, name, intro, type, artStyle, videoRatio, model } = req.body; + const { id, name, intro, type, artStyle, videoRatio, imageModel, videoModel } = req.body; await u.db("o_project").where("id", id).update({ name, @@ -26,7 +27,8 @@ export default router.post( type, artStyle, videoRatio, - model, + imageModel, + videoModel, }); res.status(200).send(success({ message: "新增项目成功" }));