政务数据资源中心(Government data Resource center)
03专项3期主要建设内容
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.
|
|
|
/* eslint-disable*/
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
module.exports = dc => {
|
|
|
|
const DataTypes = dc.ORM;
|
|
|
|
const sequelize = dc.orm;
|
|
|
|
const DataSource = sequelize.define("dataSource", {
|
|
|
|
id: {
|
|
|
|
type: DataTypes.INTEGER,
|
|
|
|
allowNull: false,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "ID唯一标识",
|
|
|
|
primaryKey: true,
|
|
|
|
field: "id",
|
|
|
|
autoIncrement: true,
|
|
|
|
unique: "t_data_source_id_uindex"
|
|
|
|
},
|
|
|
|
name: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: false,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "数据源名称",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "name",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
audited: {
|
|
|
|
type: DataTypes.BOOLEAN,
|
|
|
|
allowNull: false,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "是否审核",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "audited",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
adapter: {
|
|
|
|
type: DataTypes.INTEGER,
|
|
|
|
allowNull: false,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "适配器",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "adapter",
|
|
|
|
autoIncrement: false,
|
|
|
|
references: {
|
|
|
|
key: "id",
|
|
|
|
model: "tAdapter"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mountPath: {
|
|
|
|
type: DataTypes.INTEGER,
|
|
|
|
allowNull: false,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "数据源挂载路径",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "mount_path",
|
|
|
|
autoIncrement: false,
|
|
|
|
references: {
|
|
|
|
key: "id",
|
|
|
|
model: "tResourceCatalog"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
description: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "描述",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "description",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
config: {
|
|
|
|
type: DataTypes.JSONB,
|
|
|
|
allowNull: false,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "数据源参数配置",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "config",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
time: {
|
|
|
|
type: DataTypes.DATE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "修改时间",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "time",
|
|
|
|
autoIncrement: false
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
tableName: "t_data_source",
|
|
|
|
comment: "",
|
|
|
|
indexes: []
|
|
|
|
});
|
|
|
|
dc.models.DataSource = DataSource;
|
|
|
|
return DataSource;
|
|
|
|
};
|