# Conflicts:
#	src/types/database.d.ts
This commit is contained in:
zhishi 2026-03-31 18:49:53 +08:00
commit 36d985b23d
4 changed files with 28 additions and 9 deletions

View File

@ -37,6 +37,7 @@ export default async (knex: Knex, forceInit: boolean = false): Promise<void> =>
table.text("intro");
table.text("type");
table.text("artStyle");
table.text("mode");
table.text("videoRatio");
table.integer("createTime");
table.integer("userId");

View File

@ -17,11 +17,11 @@ export default router.post(
videoRatio: z.string(),
imageModel: z.string(),
videoModel: z.string(),
imageQuality: z.string()
imageQuality: z.string(),
mode: z.string(),
}),
async (req, res) => {
const { projectType, name, intro, type, artStyle, videoRatio, imageModel, videoModel,imageQuality } = req.body;
const { projectType, name, intro, type, artStyle, videoRatio, imageModel, videoModel, imageQuality, mode } = req.body;
await u.db("o_project").insert({
projectType,
@ -34,7 +34,8 @@ export default router.post(
imageModel,
videoModel,
createTime: Date.now(),
imageQuality
imageQuality,
mode,
});
res.status(200).send(success({ message: "新增项目成功" }));

View File

@ -18,10 +18,11 @@ export default router.post(
imageModel: z.string(),
videoModel: z.string(),
projectType: z.string(),
imageQuality: z.string()
imageQuality: z.string(),
mode: z.string(),
}),
async (req, res) => {
const { id, name, intro, type, artStyle, videoRatio, imageModel, videoModel,imageQuality, projectType } = req.body;
const { id, name, intro, type, artStyle, videoRatio, imageModel, videoModel, imageQuality, projectType, mode } = req.body;
await u.db("o_project").where("id", id).update({
name,
@ -33,8 +34,9 @@ export default router.post(
videoModel,
imageQuality,
projectType,
mode,
});
res.status(200).send(success({ message: "新增项目成功" }));
res.status(200).send(success({ message: "编辑项目成功" }));
},
);

View File

@ -1,6 +1,20 @@
// @db-hash d1fbadf1691063f5a730337685fd85b1
// @db-hash 125ad64f9dc929a01dd6bfb955f16031
//该文件由脚本自动生成,请勿手动修改
export interface _o_project_old_20260331 {
'artStyle'?: string | null;
'createTime'?: number | null;
'id'?: number | null;
'imageModel'?: string | null;
'imageQuality'?: string | null;
'intro'?: string | null;
'name'?: string | null;
'projectType'?: string | null;
'type'?: string | null;
'userId'?: number | null;
'videoModel'?: string | null;
'videoRatio'?: string | null;
}
export interface memories {
'content': string;
'createTime': number;
@ -73,7 +87,6 @@ export interface o_image {
'filePath'?: string | null;
'id'?: number;
'model'?: string | null;
'reason'?: string | null;
'resolution'?: string | null;
'state'?: string | null;
'type'?: string | null;
@ -114,6 +127,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;
@ -235,6 +249,7 @@ export interface o_videoConfig {
}
export interface DB {
"_o_project_old_20260331": _o_project_old_20260331;
"memories": memories;
"o_agentDeploy": o_agentDeploy;
"o_agentWorkData": o_agentWorkData;