添加项目加入模型选项

This commit is contained in:
小帅 2026-03-26 00:30:29 +08:00
parent 95dfc38f3a
commit 3b9d9a7a8a
6 changed files with 10 additions and 5 deletions

2
env/.env.dev vendored
View File

@ -1,4 +1,4 @@
NODE_ENV=dev
PORT=10588
OSSURL=http://192.168.0.74:10588/
OSSURL=http://127.0.0.1:10588/

View File

@ -28,6 +28,7 @@ export default async (knex: Knex, forceInit: boolean = false): Promise<void> =>
builder: (table) => {
table.integer("id");
table.string("projectType");
table.string("model");
table.text("name");
table.text("intro");
table.text("type");

View File

@ -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 = {

View File

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

View File

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

View File

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