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.
 
 
 

96 lines
2.3 KiB

/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const ReportTemplateBlock = sequelize.define("reportTemplateBlock", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "Primary key",
primaryKey: true,
field: "id",
autoIncrement: true
},
templateId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "Template id",
primaryKey: false,
field: "template_id",
autoIncrement: false,
references: {
key: "id",
model: "reportTemplate"
}
},
chapterId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "Chapter id",
primaryKey: false,
field: "chapter_id",
autoIncrement: false,
references: {
key: "id",
model: "reportTemplateChapter"
}
},
blockType: {
type: DataTypes.TEXT,
allowNull: false,
defaultValue: null,
comment: "Block type",
primaryKey: false,
field: "block_type",
autoIncrement: false
},
position: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "Block position",
primaryKey: false,
field: "position",
autoIncrement: false
},
defaultConfig: {
type: DataTypes.JSONB,
allowNull: false,
defaultValue: null,
comment: "Block default config",
primaryKey: false,
field: "default_config",
autoIncrement: false
},
contentSnapshot: {
type: DataTypes.JSONB,
allowNull: true,
defaultValue: null,
comment: "Block output snapshot",
primaryKey: false,
field: "content_snapshot",
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_template_block",
comment: "Report template block table",
indexes: []
});
dc.models.ReportTemplateBlock = ReportTemplateBlock;
return ReportTemplateBlock;
};