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.
 
 
 

128 lines
3.1 KiB

/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const ReportTemplateBatchDimension = sequelize.define("reportTemplateBatchDimension", {
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"
}
},
name: {
type: DataTypes.TEXT,
allowNull: false,
defaultValue: null,
comment: "Dimension name",
primaryKey: false,
field: "name",
autoIncrement: false
},
dimensionType: {
type: DataTypes.TEXT,
allowNull: false,
defaultValue: null,
comment: "Dimension type",
primaryKey: false,
field: "dimension_type",
autoIncrement: false
},
sourceTable: {
type: DataTypes.TEXT,
allowNull: false,
defaultValue: null,
comment: "Source table or dataset id",
primaryKey: false,
field: "source_table",
autoIncrement: false
},
keyField: {
type: DataTypes.TEXT,
allowNull: false,
defaultValue: null,
comment: "Dimension key field",
primaryKey: false,
field: "key_field",
autoIncrement: false
},
labelField: {
type: DataTypes.TEXT,
allowNull: true,
defaultValue: null,
comment: "Dimension label field",
primaryKey: false,
field: "label_field",
autoIncrement: false
},
timeField: {
type: DataTypes.TEXT,
allowNull: true,
defaultValue: null,
comment: "Time field",
primaryKey: false,
field: "time_field",
autoIncrement: false
},
timeGranularity: {
type: DataTypes.TEXT,
allowNull: true,
defaultValue: null,
comment: "Time granularity",
primaryKey: false,
field: "time_granularity",
autoIncrement: false
},
config: {
type: DataTypes.JSONB,
allowNull: false,
defaultValue: {},
comment: "Dimension extra config",
primaryKey: false,
field: "config",
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_template_batch_dimension",
comment: "Report template batch dimension table",
indexes: []
});
dc.models.ReportTemplateBatchDimension = ReportTemplateBatchDimension;
return ReportTemplateBatchDimension;
};