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.
53 lines
1.3 KiB
53 lines
1.3 KiB
/* eslint-disable*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const ReportSchemaVersion = sequelize.define("reportSchemaVersion", {
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "Primary key",
|
|
primaryKey: true,
|
|
field: "id",
|
|
autoIncrement: true
|
|
},
|
|
versionName: {
|
|
type: DataTypes.TEXT,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "Schema version name",
|
|
primaryKey: false,
|
|
field: "version_name",
|
|
autoIncrement: false
|
|
},
|
|
schemaDefinition: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "Schema definition json",
|
|
primaryKey: false,
|
|
field: "schema_definition",
|
|
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_schema_version",
|
|
comment: "Report schema version table",
|
|
indexes: []
|
|
});
|
|
dc.models.ReportSchemaVersion = ReportSchemaVersion;
|
|
return ReportSchemaVersion;
|
|
};
|
|
|
|
|