ai-query对接新版freesun-agent接口的分支
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

97 lines
2.2 KiB

/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const ReportChapter = sequelize.define("reportChapter", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "Primary key",
primaryKey: true,
field: "id",
autoIncrement: true
},
instanceId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "Instance id",
primaryKey: false,
field: "instance_id",
autoIncrement: false,
references: {
key: "id",
model: "reportInstance"
}
},
parentId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "Parent chapter id",
primaryKey: false,
field: "parent_id",
autoIncrement: false,
references: {
key: "id",
model: "reportChapter"
}
},
title: {
type: DataTypes.TEXT,
allowNull: false,
defaultValue: null,
comment: "Chapter title",
primaryKey: false,
field: "title",
autoIncrement: false
},
position: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "Chapter position",
primaryKey: false,
field: "position",
autoIncrement: false
},
prompts: {
type: DataTypes.TEXT,
allowNull: true,
defaultValue: null,
comment: "AI prompts",
primaryKey: false,
field: "prompts",
autoIncrement: false
},
status: {
type: DataTypes.TEXT,
allowNull: true,
defaultValue: null,
comment: "Chapter writing status",
primaryKey: false,
field: "status",
autoIncrement: false
},
createdAt: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: sequelize.literal('CURRENT_TIMESTAMP'),
comment: "Created time",
primaryKey: false,
field: "created_at",
autoIncrement: false
}
}, {
tableName: "report_chapter",
comment: "Report chapter table",
indexes: []
});
dc.models.ReportChapter = ReportChapter;
return ReportChapter;
};