修复问题
This commit is contained in:
parent
5bfe3d48ed
commit
12c51dee92
@ -276,6 +276,7 @@ export default async (knex: Knex, forceInit: boolean = false): Promise<void> =>
|
|||||||
table.text("remark");
|
table.text("remark");
|
||||||
table.text("type");
|
table.text("type");
|
||||||
table.text("describe");
|
table.text("describe");
|
||||||
|
table.integer("scriptId");//剧本id
|
||||||
table.integer("imageId").unsigned().references("id").inTable("o_image");
|
table.integer("imageId").unsigned().references("id").inTable("o_image");
|
||||||
table.integer("sonId");
|
table.integer("sonId");
|
||||||
table.integer("projectId");
|
table.integer("projectId");
|
||||||
@ -294,9 +295,8 @@ export default async (knex: Knex, forceInit: boolean = false): Promise<void> =>
|
|||||||
table.text("filePath");
|
table.text("filePath");
|
||||||
table.text("type");
|
table.text("type");
|
||||||
table.integer("assetsId");
|
table.integer("assetsId");
|
||||||
table.integer("scriptId");
|
table.text("model");
|
||||||
table.integer("projectId");
|
table.text("resolution");
|
||||||
table.integer("videoId");
|
|
||||||
table.text("state");
|
table.text("state");
|
||||||
table.primary(["id"]);
|
table.primary(["id"]);
|
||||||
table.unique(["id"]);
|
table.unique(["id"]);
|
||||||
|
|||||||
@ -12,6 +12,7 @@ export default router.post(
|
|||||||
}),
|
}),
|
||||||
async (req, res) => {
|
async (req, res) => {
|
||||||
const { id } = req.body;
|
const { id } = req.body;
|
||||||
|
console.log("%c Line:15 🍑 id", "background:#465975", id);
|
||||||
const assetsData = await u.db("o_image").where("assetsId", id);
|
const assetsData = await u.db("o_image").where("assetsId", id);
|
||||||
await Promise.all(assetsData.map((i) => i.filePath && u.oss.deleteFile(i.filePath)));
|
await Promise.all(assetsData.map((i) => i.filePath && u.oss.deleteFile(i.filePath)));
|
||||||
await u.db("o_assets").where({ id }).delete();
|
await u.db("o_assets").where({ id }).delete();
|
||||||
|
|||||||
@ -50,7 +50,6 @@ export default router.post(
|
|||||||
filePath: savePath,
|
filePath: savePath,
|
||||||
type,
|
type,
|
||||||
assetsId: id,
|
assetsId: id,
|
||||||
projectId,
|
|
||||||
state: "1",
|
state: "1",
|
||||||
});
|
});
|
||||||
await u.db("o_assets").where("id", id).update({
|
await u.db("o_assets").where("id", id).update({
|
||||||
|
|||||||
@ -23,9 +23,9 @@ export default router.post(
|
|||||||
//获取风格
|
//获取风格
|
||||||
const project = await u.db("o_project").where("id", projectId).select("artStyle", "type", "intro").first();
|
const project = await u.db("o_project").where("id", projectId).select("artStyle", "type", "intro").first();
|
||||||
if (!project) return res.status(500).send(success({ message: "项目为空" }));
|
if (!project) return res.status(500).send(success({ message: "项目为空" }));
|
||||||
const role = await u.getPrompts("role-generateImage") ?? "";
|
const role = (await u.getPrompts("role-generateImage")) ?? "";
|
||||||
const scene = await u.getPrompts("scene-generateImage") ?? "";
|
const scene = (await u.getPrompts("scene-generateImage")) ?? "";
|
||||||
const tool = await u.getPrompts("tool-generateImage") ?? "";
|
const tool = (await u.getPrompts("tool-generateImage")) ?? "";
|
||||||
|
|
||||||
let systemPrompt = "";
|
let systemPrompt = "";
|
||||||
let userPrompt = "";
|
let userPrompt = "";
|
||||||
|
|||||||
71
src/types/database.d.ts
vendored
71
src/types/database.d.ts
vendored
@ -1,9 +1,9 @@
|
|||||||
// @db-hash 3375b001172e37262e06bf0b798aa4ce
|
// @db-hash 04e1150a9773602183de5f660a52b092
|
||||||
//该文件由脚本自动生成,请勿手动修改
|
//该文件由脚本自动生成,请勿手动修改
|
||||||
|
|
||||||
export interface memories {
|
export interface memories {
|
||||||
'content': string;
|
'content': string;
|
||||||
'createdAt': number;
|
'createTime': number;
|
||||||
'embedding'?: string | null;
|
'embedding'?: string | null;
|
||||||
'id'?: string;
|
'id'?: string;
|
||||||
'isolationKey': string;
|
'isolationKey': string;
|
||||||
@ -35,18 +35,12 @@ export interface o_assets {
|
|||||||
'projectId'?: number | null;
|
'projectId'?: number | null;
|
||||||
'prompt'?: string | null;
|
'prompt'?: string | null;
|
||||||
'remark'?: string | null;
|
'remark'?: string | null;
|
||||||
|
'scriptId'?: number | null;
|
||||||
'sonId'?: number | null;
|
'sonId'?: number | null;
|
||||||
'startTime'?: number | null;
|
'startTime'?: number | null;
|
||||||
'state'?: string | null;
|
'state'?: string | null;
|
||||||
'type'?: string | null;
|
'type'?: string | null;
|
||||||
}
|
}
|
||||||
export interface o_chatHistory {
|
|
||||||
'data'?: string | null;
|
|
||||||
'id'?: number;
|
|
||||||
'novel'?: string | null;
|
|
||||||
'projectId'?: number | null;
|
|
||||||
'type'?: string | null;
|
|
||||||
}
|
|
||||||
export interface o_event {
|
export interface o_event {
|
||||||
'createTime'?: number | null;
|
'createTime'?: number | null;
|
||||||
'detail'?: string | null;
|
'detail'?: string | null;
|
||||||
@ -72,28 +66,6 @@ export interface o_image {
|
|||||||
'state'?: string | null;
|
'state'?: string | null;
|
||||||
'type'?: string | null;
|
'type'?: string | null;
|
||||||
}
|
}
|
||||||
export interface o_model {
|
|
||||||
'apiKey'?: string | null;
|
|
||||||
'baseUrl'?: string | null;
|
|
||||||
'createTime'?: number | null;
|
|
||||||
'id'?: number;
|
|
||||||
'index'?: number | null;
|
|
||||||
'manufacturer'?: string | null;
|
|
||||||
'model'?: string | null;
|
|
||||||
'modelType'?: string | null;
|
|
||||||
'type'?: string | null;
|
|
||||||
}
|
|
||||||
export interface o_myTasks {
|
|
||||||
'describe'?: string | null;
|
|
||||||
'id'?: number;
|
|
||||||
'model'?: string | null;
|
|
||||||
'projectId'?: number | null;
|
|
||||||
'reason'?: string | null;
|
|
||||||
'relatedObjects'?: string | null;
|
|
||||||
'startTime'?: number | null;
|
|
||||||
'state'?: string | null;
|
|
||||||
'taskClass'?: string | null;
|
|
||||||
}
|
|
||||||
export interface o_novel {
|
export interface o_novel {
|
||||||
'chapter'?: string | null;
|
'chapter'?: string | null;
|
||||||
'chapterData'?: string | null;
|
'chapterData'?: string | null;
|
||||||
@ -125,15 +97,6 @@ export interface o_project {
|
|||||||
'userId'?: number | null;
|
'userId'?: number | null;
|
||||||
'videoRatio'?: string | null;
|
'videoRatio'?: string | null;
|
||||||
}
|
}
|
||||||
export interface o_prompts {
|
|
||||||
'code'?: string | null;
|
|
||||||
'customValue'?: string | null;
|
|
||||||
'defaultValue'?: string | null;
|
|
||||||
'id'?: number;
|
|
||||||
'name'?: string | null;
|
|
||||||
'parentCode'?: string | null;
|
|
||||||
'type'?: string | null;
|
|
||||||
}
|
|
||||||
export interface o_script {
|
export interface o_script {
|
||||||
'content'?: string | null;
|
'content'?: string | null;
|
||||||
'createTime'?: number | null;
|
'createTime'?: number | null;
|
||||||
@ -141,35 +104,15 @@ export interface o_script {
|
|||||||
'name'?: string | null;
|
'name'?: string | null;
|
||||||
'projectId'?: number | null;
|
'projectId'?: number | null;
|
||||||
}
|
}
|
||||||
export interface o_scriptAssets {
|
|
||||||
'assetsId'?: number | null;
|
|
||||||
'id'?: number;
|
|
||||||
'scriptId'?: number | null;
|
|
||||||
}
|
|
||||||
export interface o_scriptOutline {
|
|
||||||
'id'?: number;
|
|
||||||
'outlineId'?: number | null;
|
|
||||||
'scriptId'?: number | null;
|
|
||||||
}
|
|
||||||
export interface o_setting {
|
export interface o_setting {
|
||||||
'key'?: string | null;
|
'key'?: string | null;
|
||||||
'value'?: string | null;
|
'value'?: string | null;
|
||||||
}
|
}
|
||||||
export interface o_skills {
|
|
||||||
'id'?: number;
|
|
||||||
'name'?: string | null;
|
|
||||||
'startTime'?: number | null;
|
|
||||||
}
|
|
||||||
export interface o_storyboard {
|
export interface o_storyboard {
|
||||||
'createTime'?: number | null;
|
'createTime'?: number | null;
|
||||||
'id'?: number;
|
'id'?: number;
|
||||||
'name'?: string | null;
|
'name'?: string | null;
|
||||||
}
|
}
|
||||||
export interface o_storyboardScript {
|
|
||||||
'id'?: number;
|
|
||||||
'scriptId'?: number | null;
|
|
||||||
'storyboardId'?: number | null;
|
|
||||||
}
|
|
||||||
export interface o_tasks {
|
export interface o_tasks {
|
||||||
'describe'?: string | null;
|
'describe'?: string | null;
|
||||||
'id'?: number;
|
'id'?: number;
|
||||||
@ -235,25 +178,17 @@ export interface DB {
|
|||||||
"o_agentDeploy": o_agentDeploy;
|
"o_agentDeploy": o_agentDeploy;
|
||||||
"o_artStyle": o_artStyle;
|
"o_artStyle": o_artStyle;
|
||||||
"o_assets": o_assets;
|
"o_assets": o_assets;
|
||||||
"o_chatHistory": o_chatHistory;
|
|
||||||
"o_event": o_event;
|
"o_event": o_event;
|
||||||
"o_eventChapter": o_eventChapter;
|
"o_eventChapter": o_eventChapter;
|
||||||
"o_flowData": o_flowData;
|
"o_flowData": o_flowData;
|
||||||
"o_image": o_image;
|
"o_image": o_image;
|
||||||
"o_model": o_model;
|
|
||||||
"o_myTasks": o_myTasks;
|
|
||||||
"o_novel": o_novel;
|
"o_novel": o_novel;
|
||||||
"o_outline": o_outline;
|
"o_outline": o_outline;
|
||||||
"o_outlineNovel": o_outlineNovel;
|
"o_outlineNovel": o_outlineNovel;
|
||||||
"o_project": o_project;
|
"o_project": o_project;
|
||||||
"o_prompts": o_prompts;
|
|
||||||
"o_script": o_script;
|
"o_script": o_script;
|
||||||
"o_scriptAssets": o_scriptAssets;
|
|
||||||
"o_scriptOutline": o_scriptOutline;
|
|
||||||
"o_setting": o_setting;
|
"o_setting": o_setting;
|
||||||
"o_skills": o_skills;
|
|
||||||
"o_storyboard": o_storyboard;
|
"o_storyboard": o_storyboard;
|
||||||
"o_storyboardScript": o_storyboardScript;
|
|
||||||
"o_tasks": o_tasks;
|
"o_tasks": o_tasks;
|
||||||
"o_user": o_user;
|
"o_user": o_user;
|
||||||
"o_vendorConfig": o_vendorConfig;
|
"o_vendorConfig": o_vendorConfig;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user