Merge branch '108' of https://github.com/HBAI-Ltd/Toonflow-app into 108
This commit is contained in:
commit
4c8cbea608
124
src/router.ts
124
src/router.ts
@ -1,4 +1,4 @@
|
||||
// @routes-hash e5b98904cda1207b1ce84306a79f00dd
|
||||
// @routes-hash 6d230b9f278cc0ba49f62f5e48365dea
|
||||
import { Express } from "express";
|
||||
|
||||
import route1 from "./routes/agents/clearMemory";
|
||||
@ -42,35 +42,38 @@ import route38 from "./routes/production/getFlowData";
|
||||
import route39 from "./routes/production/getProductionData";
|
||||
import route40 from "./routes/production/getStoryboardData";
|
||||
import route41 from "./routes/production/saveFlowData";
|
||||
import route42 from "./routes/production/workbench/generateVideo";
|
||||
import route43 from "./routes/production/workbench/getVideoModelDetail";
|
||||
import route44 from "./routes/project/addProject";
|
||||
import route45 from "./routes/project/delProject";
|
||||
import route46 from "./routes/project/editProject";
|
||||
import route47 from "./routes/project/getProject";
|
||||
import route48 from "./routes/script/addScript";
|
||||
import route49 from "./routes/script/delScript";
|
||||
import route50 from "./routes/script/exportScript";
|
||||
import route51 from "./routes/script/getScrptApi";
|
||||
import route52 from "./routes/script/updateScript";
|
||||
import route53 from "./routes/setting/agentDeploy/deployAgentModel";
|
||||
import route54 from "./routes/setting/agentDeploy/getAgentDeploy";
|
||||
import route55 from "./routes/setting/agentDeploy/updateKey";
|
||||
import route56 from "./routes/setting/dbConfig/clearData";
|
||||
import route57 from "./routes/setting/getTextModel";
|
||||
import route58 from "./routes/setting/loginConfig/getUser";
|
||||
import route59 from "./routes/setting/loginConfig/updateUserPwd";
|
||||
import route60 from "./routes/setting/memoryConfig/getMemory";
|
||||
import route61 from "./routes/setting/memoryConfig/sureMemory";
|
||||
import route62 from "./routes/setting/vendorConfig/addVendor";
|
||||
import route63 from "./routes/setting/vendorConfig/deleteVendor";
|
||||
import route64 from "./routes/setting/vendorConfig/getVendorList";
|
||||
import route65 from "./routes/setting/vendorConfig/modelTest";
|
||||
import route66 from "./routes/setting/vendorConfig/updateVendor";
|
||||
import route67 from "./routes/task/getTaskApi";
|
||||
import route68 from "./routes/task/getTaskCategories";
|
||||
import route69 from "./routes/task/taskDetails";
|
||||
import route70 from "./routes/test/test";
|
||||
import route42 from "./routes/production/workbench/confirmSelection";
|
||||
import route43 from "./routes/production/workbench/delVideo";
|
||||
import route44 from "./routes/production/workbench/generateVideo";
|
||||
import route45 from "./routes/production/workbench/getVideoModelDetail";
|
||||
import route46 from "./routes/production/workbench/videoPolling";
|
||||
import route47 from "./routes/project/addProject";
|
||||
import route48 from "./routes/project/delProject";
|
||||
import route49 from "./routes/project/editProject";
|
||||
import route50 from "./routes/project/getProject";
|
||||
import route51 from "./routes/script/addScript";
|
||||
import route52 from "./routes/script/delScript";
|
||||
import route53 from "./routes/script/exportScript";
|
||||
import route54 from "./routes/script/getScrptApi";
|
||||
import route55 from "./routes/script/updateScript";
|
||||
import route56 from "./routes/setting/agentDeploy/deployAgentModel";
|
||||
import route57 from "./routes/setting/agentDeploy/getAgentDeploy";
|
||||
import route58 from "./routes/setting/agentDeploy/updateKey";
|
||||
import route59 from "./routes/setting/dbConfig/clearData";
|
||||
import route60 from "./routes/setting/getTextModel";
|
||||
import route61 from "./routes/setting/loginConfig/getUser";
|
||||
import route62 from "./routes/setting/loginConfig/updateUserPwd";
|
||||
import route63 from "./routes/setting/memoryConfig/getMemory";
|
||||
import route64 from "./routes/setting/memoryConfig/sureMemory";
|
||||
import route65 from "./routes/setting/vendorConfig/addVendor";
|
||||
import route66 from "./routes/setting/vendorConfig/deleteVendor";
|
||||
import route67 from "./routes/setting/vendorConfig/getVendorList";
|
||||
import route68 from "./routes/setting/vendorConfig/modelTest";
|
||||
import route69 from "./routes/setting/vendorConfig/updateVendor";
|
||||
import route70 from "./routes/task/getTaskApi";
|
||||
import route71 from "./routes/task/getTaskCategories";
|
||||
import route72 from "./routes/task/taskDetails";
|
||||
import route73 from "./routes/test/test";
|
||||
|
||||
export default async (app: Express) => {
|
||||
app.use("/api/agents/clearMemory", route1);
|
||||
@ -114,33 +117,36 @@ export default async (app: Express) => {
|
||||
app.use("/api/production/getProductionData", route39);
|
||||
app.use("/api/production/getStoryboardData", route40);
|
||||
app.use("/api/production/saveFlowData", route41);
|
||||
app.use("/api/production/workbench/generateVideo", route42);
|
||||
app.use("/api/production/workbench/getVideoModelDetail", route43);
|
||||
app.use("/api/project/addProject", route44);
|
||||
app.use("/api/project/delProject", route45);
|
||||
app.use("/api/project/editProject", route46);
|
||||
app.use("/api/project/getProject", route47);
|
||||
app.use("/api/script/addScript", route48);
|
||||
app.use("/api/script/delScript", route49);
|
||||
app.use("/api/script/exportScript", route50);
|
||||
app.use("/api/script/getScrptApi", route51);
|
||||
app.use("/api/script/updateScript", route52);
|
||||
app.use("/api/setting/agentDeploy/deployAgentModel", route53);
|
||||
app.use("/api/setting/agentDeploy/getAgentDeploy", route54);
|
||||
app.use("/api/setting/agentDeploy/updateKey", route55);
|
||||
app.use("/api/setting/dbConfig/clearData", route56);
|
||||
app.use("/api/setting/getTextModel", route57);
|
||||
app.use("/api/setting/loginConfig/getUser", route58);
|
||||
app.use("/api/setting/loginConfig/updateUserPwd", route59);
|
||||
app.use("/api/setting/memoryConfig/getMemory", route60);
|
||||
app.use("/api/setting/memoryConfig/sureMemory", route61);
|
||||
app.use("/api/setting/vendorConfig/addVendor", route62);
|
||||
app.use("/api/setting/vendorConfig/deleteVendor", route63);
|
||||
app.use("/api/setting/vendorConfig/getVendorList", route64);
|
||||
app.use("/api/setting/vendorConfig/modelTest", route65);
|
||||
app.use("/api/setting/vendorConfig/updateVendor", route66);
|
||||
app.use("/api/task/getTaskApi", route67);
|
||||
app.use("/api/task/getTaskCategories", route68);
|
||||
app.use("/api/task/taskDetails", route69);
|
||||
app.use("/api/test/test", route70);
|
||||
app.use("/api/production/workbench/confirmSelection", route42);
|
||||
app.use("/api/production/workbench/delVideo", route43);
|
||||
app.use("/api/production/workbench/generateVideo", route44);
|
||||
app.use("/api/production/workbench/getVideoModelDetail", route45);
|
||||
app.use("/api/production/workbench/videoPolling", route46);
|
||||
app.use("/api/project/addProject", route47);
|
||||
app.use("/api/project/delProject", route48);
|
||||
app.use("/api/project/editProject", route49);
|
||||
app.use("/api/project/getProject", route50);
|
||||
app.use("/api/script/addScript", route51);
|
||||
app.use("/api/script/delScript", route52);
|
||||
app.use("/api/script/exportScript", route53);
|
||||
app.use("/api/script/getScrptApi", route54);
|
||||
app.use("/api/script/updateScript", route55);
|
||||
app.use("/api/setting/agentDeploy/deployAgentModel", route56);
|
||||
app.use("/api/setting/agentDeploy/getAgentDeploy", route57);
|
||||
app.use("/api/setting/agentDeploy/updateKey", route58);
|
||||
app.use("/api/setting/dbConfig/clearData", route59);
|
||||
app.use("/api/setting/getTextModel", route60);
|
||||
app.use("/api/setting/loginConfig/getUser", route61);
|
||||
app.use("/api/setting/loginConfig/updateUserPwd", route62);
|
||||
app.use("/api/setting/memoryConfig/getMemory", route63);
|
||||
app.use("/api/setting/memoryConfig/sureMemory", route64);
|
||||
app.use("/api/setting/vendorConfig/addVendor", route65);
|
||||
app.use("/api/setting/vendorConfig/deleteVendor", route66);
|
||||
app.use("/api/setting/vendorConfig/getVendorList", route67);
|
||||
app.use("/api/setting/vendorConfig/modelTest", route68);
|
||||
app.use("/api/setting/vendorConfig/updateVendor", route69);
|
||||
app.use("/api/task/getTaskApi", route70);
|
||||
app.use("/api/task/getTaskCategories", route71);
|
||||
app.use("/api/task/taskDetails", route72);
|
||||
app.use("/api/test/test", route73);
|
||||
}
|
||||
|
||||
@ -153,7 +153,6 @@ export default router.post(
|
||||
return res.status(500).send("资产已被删除");
|
||||
}
|
||||
} catch (e) {
|
||||
console.errork(e);
|
||||
await u.db("o_image").where("id", imageId).update({
|
||||
state: "生成失败",
|
||||
});
|
||||
|
||||
@ -12,89 +12,78 @@ export default router.post(
|
||||
async (req, res) => {
|
||||
const { scriptId } = req.body;
|
||||
|
||||
// 1. 查出该剧本下所有分镜
|
||||
//查询分镜数据
|
||||
const storyboards = await u.db("o_storyboard").where("o_storyboard.scriptId", scriptId).select("*").orderBy("o_storyboard.createTime", "asc");
|
||||
|
||||
if (storyboards.length === 0) {
|
||||
return res.status(200).send(success([]));
|
||||
}
|
||||
|
||||
const storyboardIds = storyboards.map((s) => s.id as number);
|
||||
|
||||
// 2. 批量查出所有相关视频
|
||||
const videos = await u
|
||||
.db("o_video")
|
||||
.whereIn("o_video.storyboardId", storyboardIds)
|
||||
.select("o_video.id", "o_video.storyboardId", "o_video.filePath", "o_video.state", "o_video.errorReason")
|
||||
.orderBy("o_video.time", "desc");
|
||||
|
||||
// 3. 批量查出所有相关配置
|
||||
const configs = await u
|
||||
.db("o_videoConfig")
|
||||
.whereIn("o_videoConfig.storyboardId", storyboardIds)
|
||||
.select(
|
||||
"o_videoConfig.id",
|
||||
"o_videoConfig.storyboardId",
|
||||
"o_videoConfig.videoId",
|
||||
"o_videoConfig.prompt",
|
||||
"o_videoConfig.model",
|
||||
"o_videoConfig.mode",
|
||||
"o_videoConfig.resolution",
|
||||
"o_videoConfig.duration",
|
||||
"o_videoConfig.audio",
|
||||
"o_videoConfig.data",
|
||||
);
|
||||
|
||||
// 4. 按 storyboardId 建立 Map 方便聚合
|
||||
const videoMap = new Map<number, typeof videos>();
|
||||
for (const video of videos) {
|
||||
const sid = video.storyboardId as number;
|
||||
if (!videoMap.has(sid)) videoMap.set(sid, []);
|
||||
videoMap.get(sid)!.push(video);
|
||||
}
|
||||
const configMap = new Map(configs.map((c) => [c.storyboardId as number, c]));
|
||||
|
||||
// 5. 组装结果:分镜平铺 + config 对象 + videos 数组
|
||||
const data = await Promise.all(
|
||||
storyboards.map(async (storyboard) => {
|
||||
const sid = storyboard.id as number;
|
||||
const config = configMap.get(sid) ?? null;
|
||||
let configDataWithFilePath: any[] = [];
|
||||
if (config?.data) {
|
||||
const parsedData: { id: number; type: string }[] = JSON.parse(config.data);
|
||||
configDataWithFilePath = await Promise.all(
|
||||
parsedData.map(async (item) => {
|
||||
if (item.type === "storyboard") {
|
||||
const row = await u.db("o_storyboard").where("id", item.id).select("filePath").first();
|
||||
return row?.filePath ? await u.oss.getFileUrl(row.filePath) : null;
|
||||
}
|
||||
if (item.type === "assets") {
|
||||
const row = await u
|
||||
.db("o_assets")
|
||||
.where("o_assets.id", item.id)
|
||||
.leftJoin("o_image", "o_assets.imageId", "o_image.id")
|
||||
.select("o_image.filePath")
|
||||
.first();
|
||||
return row?.filePath ? await u.oss.getFileUrl(row.filePath) : null;
|
||||
}
|
||||
return null;
|
||||
}),
|
||||
);
|
||||
}
|
||||
const storyboardsList = await Promise.all(
|
||||
storyboards.map(async (item) => {
|
||||
return {
|
||||
...storyboard,
|
||||
filePath: storyboard.filePath && (await u.oss.getFileUrl(storyboard.filePath!)),
|
||||
config: config ? { ...config, data: configDataWithFilePath } : null,
|
||||
videos: await Promise.all(
|
||||
(videoMap.get(sid) ?? []).map(async (video) => ({
|
||||
...video,
|
||||
filePath: video.filePath ? await u.oss.getFileUrl(video.filePath) : null,
|
||||
})),
|
||||
),
|
||||
...item,
|
||||
filePath: item.filePath ? await u.oss.getFileUrl(item.filePath) : null,
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
||||
const storyboardIds = storyboardsList.map((s) => s.id as number);
|
||||
|
||||
//查询分镜配置
|
||||
const storyboardConfigs = await u.db("o_videoConfig").whereIn("storyboardId", storyboardIds).select("*");
|
||||
const storyboardConfigsList = await Promise.all(
|
||||
storyboardConfigs.map(async (item) => {
|
||||
if (item.data) {
|
||||
const parsedData = JSON.parse(item.data);
|
||||
const dataWithFilePath = await Promise.all(
|
||||
parsedData.map(async (d: { type: string; id: number }) => {
|
||||
if (d.type === "assets" && d.id) {
|
||||
const row = await u
|
||||
.db("o_assets")
|
||||
.where("o_assets.id", d.id)
|
||||
.leftJoin("o_image", "o_assets.imageId", "o_image.id")
|
||||
.select("o_image.filePath as imageFilePath")
|
||||
.first();
|
||||
if (row?.imageFilePath) {
|
||||
return await u.oss.getFileUrl(row.imageFilePath);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
if (d.type === "storyboard" && d.id) {
|
||||
const row = await u.db("o_storyboard").where("id", d.id).select("filePath").first();
|
||||
if (row?.filePath) {
|
||||
return await u.oss.getFileUrl(row.filePath);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}),
|
||||
);
|
||||
return {
|
||||
...item,
|
||||
data: dataWithFilePath,
|
||||
};
|
||||
}
|
||||
}),
|
||||
);
|
||||
//查询视频数据
|
||||
const videos = await u.db("o_video").whereIn("storyboardId", storyboardIds).select("*");
|
||||
|
||||
const videosList = await Promise.all(
|
||||
videos.map(async (item) => {
|
||||
return {
|
||||
...item,
|
||||
filePath: item.filePath ? await u.oss.getFileUrl(item.filePath) : null,
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
||||
//组装数据
|
||||
const data = storyboardsList.map((storyboard) => {
|
||||
const config = storyboardConfigsList.find((item) => item?.storyboardId === storyboard.id) || null;
|
||||
return {
|
||||
...storyboard,
|
||||
config,
|
||||
videos: videosList.filter((video) => video.storyboardId === storyboard.id),
|
||||
};
|
||||
});
|
||||
return res.status(200).send(success(data));
|
||||
},
|
||||
);
|
||||
|
||||
@ -8,17 +8,17 @@ const router = express.Router();
|
||||
export default router.post(
|
||||
"/",
|
||||
validateFields({
|
||||
projectId: z.number(),
|
||||
scriptId: z.number(),
|
||||
}),
|
||||
async (req, res) => {
|
||||
const { projectId } = req.body;
|
||||
const storyboardData = await u.db("o_storyboard");
|
||||
const { scriptId } = req.body;
|
||||
const storyboardData = await u.db("o_storyboard").where({ scriptId });
|
||||
const data = await Promise.all(
|
||||
storyboardData.map(async (i) => {
|
||||
return {
|
||||
...i,
|
||||
title: i.name,
|
||||
src: i.filePath ? await u.oss.getFileUrl(i.filePath!) : "",
|
||||
title: i.title,
|
||||
filePath: i.filePath ? await u.oss.getFileUrl(i.filePath!) : "",
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
||||
19
src/routes/production/workbench/confirmSelection.ts
Normal file
19
src/routes/production/workbench/confirmSelection.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import express from "express";
|
||||
import u from "@/utils";
|
||||
import { z } from "zod";
|
||||
import { success } from "@/lib/responseFormat";
|
||||
import { validateFields } from "@/middleware/middleware";
|
||||
const router = express.Router();
|
||||
|
||||
export default router.post(
|
||||
"/",
|
||||
validateFields({
|
||||
storyboardId: z.number(),
|
||||
videoId: z.number(),
|
||||
}),
|
||||
async (req, res) => {
|
||||
const { storyboardId, videoId } = req.body;
|
||||
await u.db("o_videoConfig").where("storyboardId", storyboardId).update({ videoId, updateTime: Date.now() });
|
||||
res.status(200).send(success({ message: "选择确认成功" }));
|
||||
},
|
||||
);
|
||||
19
src/routes/production/workbench/delVideo.ts
Normal file
19
src/routes/production/workbench/delVideo.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import express from "express";
|
||||
import u from "@/utils";
|
||||
import { z } from "zod";
|
||||
import { success } from "@/lib/responseFormat";
|
||||
import { validateFields } from "@/middleware/middleware";
|
||||
const router = express.Router();
|
||||
|
||||
export default router.post(
|
||||
"/",
|
||||
validateFields({
|
||||
videoId: z.number(),
|
||||
}),
|
||||
async (req, res) => {
|
||||
const { videoId } = req.body;
|
||||
await u.db("o_video").where("id", videoId).delete();
|
||||
await u.db("o_videoConfig").where("videoId", videoId).update({ videoId: null, updateTime: Date.now() });
|
||||
res.status(200).send(success({ message: "视频删除成功" }));
|
||||
},
|
||||
);
|
||||
@ -31,13 +31,14 @@ export default router.post(
|
||||
const { scriptId, projectId, storyboardId, prompt, data, model, duration, resolution, audio, mode } = req.body;
|
||||
const videoPath = `/${projectId}/video/${uuidv4()}.mp4`; //视频保存路径
|
||||
//新增
|
||||
const [videoId] = await u.db("o_video").insert({
|
||||
const videoData = {
|
||||
filePath: videoPath,
|
||||
time: Date.now(),
|
||||
state: "生成中",
|
||||
scriptId,
|
||||
storyboardId,
|
||||
});
|
||||
};
|
||||
const [videoId] = await u.db("o_video").insert(videoData);
|
||||
//查询分镜是否已有配置
|
||||
const config = await u.db("o_videoConfig").where({ storyboardId }).first();
|
||||
//保存配置
|
||||
@ -85,47 +86,48 @@ export default router.post(
|
||||
return await u.oss.getImageBase64(item);
|
||||
}),
|
||||
);
|
||||
//开始生成
|
||||
try {
|
||||
const relatedObjects = {
|
||||
id: storyboardId,
|
||||
projectId,
|
||||
type: "视频",
|
||||
};
|
||||
const systemPrompt = `你是一个专业的视频生成引擎,能够根据用户提供的提示词、图片和参数生成高质量的视频内容。请严格按照用户的需求进行视频创作,确保输出的视频符合以下要求:
|
||||
res.status(200).send(success(videoId));
|
||||
(async () => {
|
||||
try {
|
||||
const relatedObjects = {
|
||||
id: storyboardId,
|
||||
projectId,
|
||||
type: "视频",
|
||||
};
|
||||
const systemPrompt = `你是一个专业的视频生成引擎,能够根据用户提供的提示词、图片和参数生成高质量的视频内容。请严格按照用户的需求进行视频创作,确保输出的视频符合以下要求:
|
||||
1. 视频内容必须与用户提供的提示词和图片相关联,准确反映用户的创意意图。
|
||||
2. 视频质量应达到专业水平,画面清晰、流畅,符合用户指定的分辨率和时长要求。
|
||||
3. 视频风格应与用户指定的模式数据相匹配,包括色彩、音乐、特效等元素。
|
||||
4. 视频中应包含用户提供的图片,并在视频中适当展示,以增强视频的视觉效果。
|
||||
5. 如果用户指定了音频,请确保视频中的音频与视频内容相匹配,符合用户的创意意图。`;
|
||||
|
||||
const aiVideo = u.Ai.Video(model);
|
||||
await aiVideo.run({
|
||||
systemPrompt,
|
||||
projectId,
|
||||
storyboardId,
|
||||
prompt,
|
||||
imageBase64: base64.filter((item) => item !== null) as string[],
|
||||
mode,
|
||||
duration,
|
||||
resolution,
|
||||
audio,
|
||||
taskClass: "视频生成",
|
||||
describe: "根据提示词生成视频",
|
||||
relatedObjects: JSON.stringify(relatedObjects),
|
||||
});
|
||||
await aiVideo.save(videoPath);
|
||||
await u.db("o_video").where("id", videoId).update({ state: "生成成功" });
|
||||
res.status(200).send(success({ videoId, message: "视频生成成功" }));
|
||||
} catch (error: any) {
|
||||
await u
|
||||
.db("o_video")
|
||||
.where("id", videoId)
|
||||
.update({
|
||||
state: "生成失败",
|
||||
errorReason: error instanceof Error ? error.message : "未知错误",
|
||||
const aiVideo = u.Ai.Video(model);
|
||||
await aiVideo.run({
|
||||
systemPrompt,
|
||||
projectId,
|
||||
storyboardId,
|
||||
prompt,
|
||||
imageBase64: base64.filter((item) => item !== null) as string[],
|
||||
mode,
|
||||
duration,
|
||||
resolution,
|
||||
audio,
|
||||
taskClass: "视频生成",
|
||||
describe: "根据提示词生成视频",
|
||||
relatedObjects: JSON.stringify(relatedObjects),
|
||||
});
|
||||
res.status(500).send({ error: "视频生成失败" });
|
||||
}
|
||||
await aiVideo.save(videoPath);
|
||||
await u.db("o_video").where("id", videoId).update({ state: "生成成功" });
|
||||
await u.db("o_videoConfig").where("storyboardId", storyboardId).update({ videoId, updateTime: Date.now() });
|
||||
} catch (error: any) {
|
||||
await u
|
||||
.db("o_video")
|
||||
.where("id", videoId)
|
||||
.update({
|
||||
state: "生成失败",
|
||||
errorReason: error instanceof Error ? error.message : "未知错误",
|
||||
});
|
||||
}
|
||||
})();
|
||||
},
|
||||
);
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
import express from "express";
|
||||
import u from "@/utils";
|
||||
import { z } from "zod";
|
||||
import { success } from "@/lib/responseFormat";
|
||||
import { validateFields } from "@/middleware/middleware";
|
||||
const router = express.Router();
|
||||
|
||||
export default router.post("/", async (req, res) => {
|
||||
|
||||
20
src/routes/production/workbench/videoPolling.ts
Normal file
20
src/routes/production/workbench/videoPolling.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import express from "express";
|
||||
import u from "@/utils";
|
||||
import { z } from "zod";
|
||||
import { success } from "@/lib/responseFormat";
|
||||
import { validateFields } from "@/middleware/middleware";
|
||||
const router = express.Router();
|
||||
|
||||
export default router.post(
|
||||
"/",
|
||||
validateFields({
|
||||
scriptId: z.number(),
|
||||
specifyIds: z.array(z.number()),
|
||||
}),
|
||||
async (req, res) => {
|
||||
const { scriptId, specifyIds } = req.body;
|
||||
console.log("%c Line:16 🍡", "background:#465975");
|
||||
const data = await u.db("o_video").where("scriptId", scriptId).whereIn("id", specifyIds).select("*");
|
||||
res.status(200).send(success(data));
|
||||
},
|
||||
);
|
||||
12
src/types/database.d.ts
vendored
12
src/types/database.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// @db-hash d0e44c9c923897d847cded0a28012baf
|
||||
// @db-hash 56071dcf512e84c37ffd555806af7162
|
||||
//该文件由脚本自动生成,请勿手动修改
|
||||
|
||||
export interface memories {
|
||||
@ -59,7 +59,7 @@ export interface o_eventChapter {
|
||||
export interface o_flowData {
|
||||
'createTime'?: number | null;
|
||||
'data'?: string | null;
|
||||
'episodesId'?: number | null;
|
||||
'espisodeId'?: number | null;
|
||||
'id'?: number;
|
||||
'key'?: string | null;
|
||||
'projectId'?: number | null;
|
||||
@ -117,25 +117,25 @@ export interface o_setting {
|
||||
'value'?: string | null;
|
||||
}
|
||||
export interface o_storyboard {
|
||||
'associateAssetsIds'?: string | null;
|
||||
'camera'?: string | null;
|
||||
'createTime'?: number | null;
|
||||
'description'?: string | null;
|
||||
'duration'?: string | null;
|
||||
'filePath'?: string | null;
|
||||
'frameType'?: string | null;
|
||||
'frameMode'?: string | null;
|
||||
'id'?: number;
|
||||
'mode'?: string | null;
|
||||
'model'?: string | null;
|
||||
'name'?: string | null;
|
||||
'prompt'?: string | null;
|
||||
'resolution'?: string | null;
|
||||
'scriptId'?: number | null;
|
||||
'sound'?: string | null;
|
||||
'title'?: string | null;
|
||||
}
|
||||
export interface o_storyboardFlow {
|
||||
'flowData': string;
|
||||
'id'?: number;
|
||||
'stroryboardId': number;
|
||||
'storyboardId': number;
|
||||
}
|
||||
export interface o_tasks {
|
||||
'describe'?: string | null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user