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.
 
 
 

123 lines
2.9 KiB

/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const ReportTemplate = sequelize.define("reportTemplate", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "Primary key",
primaryKey: true,
field: "id",
autoIncrement: true
},
name: {
type: DataTypes.TEXT,
allowNull: false,
defaultValue: null,
comment: "Template name",
primaryKey: false,
field: "name",
autoIncrement: false
},
description: {
type: DataTypes.TEXT,
allowNull: true,
defaultValue: null,
comment: "Template description",
primaryKey: false,
field: "description",
autoIncrement: false
},
version: {
type: DataTypes.TEXT,
allowNull: false,
defaultValue: null,
comment: "Template business version",
primaryKey: false,
field: "version",
autoIncrement: false
},
schemaVersionId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "Related schema version id",
primaryKey: false,
field: "schema_version_id",
autoIncrement: false,
references: {
key: "id",
model: "reportSchemaVersion"
}
},
dataSourceId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "Related data source id",
primaryKey: false,
field: "data_source_id",
autoIncrement: false,
references: {
key: "id",
model: "reportDataSource"
}
},
type: {
type: DataTypes.TEXT,
allowNull: false,
defaultValue: null,
comment: "Template type",
primaryKey: false,
field: "type",
autoIncrement: false
},
createdBy: {
type: DataTypes.TEXT,
allowNull: false,
defaultValue: null,
comment: "Creator",
primaryKey: false,
field: "created_by",
autoIncrement: false
},
departmentId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "Department id",
primaryKey: false,
field: "department_id",
autoIncrement: false
},
createdAt: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: sequelize.literal('CURRENT_TIMESTAMP'),
comment: "Created time",
primaryKey: false,
field: "created_at",
autoIncrement: false
},
isActive: {
type: DataTypes.BOOLEAN,
allowNull: true,
defaultValue: true,
comment: "Enable status",
primaryKey: false,
field: "is_active",
autoIncrement: false
}
}, {
tableName: "report_template",
comment: "Report template table",
indexes: []
});
dc.models.ReportTemplate = ReportTemplate;
return ReportTemplate;
};