# Conflicts:
#	src/types/database.d.ts
This commit is contained in:
ACT丶流星雨 2026-03-26 11:35:17 +08:00
commit 301ca63a2d
4 changed files with 13 additions and 7 deletions

View File

@ -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);
}

View File

@ -30,7 +30,8 @@ export default async (knex: Knex, forceInit: boolean = false): Promise<void> =>
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");

View File

@ -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(),
});

View File

@ -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: "新增项目成功" }));