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.
 
 
 

106 lines
2.4 KiB

/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const ReportBlock = sequelize.define("reportBlock", {
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"
}
},
chapterId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "Chapter id",
primaryKey: false,
field: "chapter_id",
autoIncrement: false,
references: {
key: "id",
model: "reportChapter"
}
},
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
},
config: {
type: DataTypes.JSONB,
allowNull: false,
defaultValue: null,
comment: "Block config",
primaryKey: false,
field: "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
},
updatedAt: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: sequelize.literal('CURRENT_TIMESTAMP'),
comment: "Updated time",
primaryKey: false,
field: "updated_at",
autoIncrement: false
}
}, {
tableName: "report_block",
comment: "Report block table",
indexes: []
});
dc.models.ReportBlock = ReportBlock;
return ReportBlock;
};