23 changed files with 1872 additions and 74 deletions
@ -0,0 +1,75 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const AcquisitionLog = sequelize.define("acquisitionLog", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "ID唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_acquisition_log_id_uindex" |
||||
|
}, |
||||
|
task: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "采集任务", |
||||
|
primaryKey: false, |
||||
|
field: "task", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tAcquisitionTask" |
||||
|
} |
||||
|
}, |
||||
|
success: { |
||||
|
type: DataTypes.BOOLEAN, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "是否采集成功", |
||||
|
primaryKey: false, |
||||
|
field: "success", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
startTime: { |
||||
|
type: DataTypes.DATE, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "任务开始时间", |
||||
|
primaryKey: false, |
||||
|
field: "start_time", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
endTime: { |
||||
|
type: DataTypes.DATE, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "任务结束时间", |
||||
|
primaryKey: false, |
||||
|
field: "end_time", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
details: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "采集详情", |
||||
|
primaryKey: false, |
||||
|
field: "details", |
||||
|
autoIncrement: false |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_acquisition_log", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.AcquisitionLog = AcquisitionLog; |
||||
|
return AcquisitionLog; |
||||
|
}; |
@ -0,0 +1,120 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const AcquisitionTask = sequelize.define("acquisitionTask", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "ID唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_acquisition_task_id_uindex" |
||||
|
}, |
||||
|
taskName: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "任务名称", |
||||
|
primaryKey: false, |
||||
|
field: "task_name", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
dataSource: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "数据源", |
||||
|
primaryKey: false, |
||||
|
field: "data_source", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tDataSource" |
||||
|
} |
||||
|
}, |
||||
|
storageStrategy: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "入库策略", |
||||
|
primaryKey: false, |
||||
|
field: "storage_strategy", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
autoReleased: { |
||||
|
type: DataTypes.BOOLEAN, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "是否自动发布", |
||||
|
primaryKey: false, |
||||
|
field: "auto_released", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
description: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "描述", |
||||
|
primaryKey: false, |
||||
|
field: "description", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
enabled: { |
||||
|
type: DataTypes.BOOLEAN, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "是否已启用", |
||||
|
primaryKey: false, |
||||
|
field: "enabled", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
cron: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "cron表达式", |
||||
|
primaryKey: false, |
||||
|
field: "cron", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
retried: { |
||||
|
type: DataTypes.BOOLEAN, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "是否重试", |
||||
|
primaryKey: false, |
||||
|
field: "retried", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
retryCount: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "重试次数", |
||||
|
primaryKey: false, |
||||
|
field: "retry_count", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
retryTime: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "重试间隔时间,单位:分钟", |
||||
|
primaryKey: false, |
||||
|
field: "retry_time", |
||||
|
autoIncrement: false |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_acquisition_task", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.AcquisitionTask = AcquisitionTask; |
||||
|
return AcquisitionTask; |
||||
|
}; |
@ -0,0 +1,71 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const Adapter = sequelize.define("adapter", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "ID唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_adapter_id_uindex" |
||||
|
}, |
||||
|
adapterName: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "适配器名称", |
||||
|
primaryKey: false, |
||||
|
field: "adapter_name", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
adapterVersion: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "适配器版本", |
||||
|
primaryKey: false, |
||||
|
field: "adapter_version", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
toolName: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "工具名称", |
||||
|
primaryKey: false, |
||||
|
field: "tool_name", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
description: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "描述", |
||||
|
primaryKey: false, |
||||
|
field: "description", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
config: { |
||||
|
type: DataTypes.JSONB, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "配置信息\r\n多个参数信息,每个参数组成:\r\n{param:参数名,\r\ntitle:标题,\r\ndefault:默认值,\r\nrequired:是否必填,\r\ndescription:描述}", |
||||
|
primaryKey: false, |
||||
|
field: "config", |
||||
|
autoIncrement: false |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_adapter", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.Adapter = Adapter; |
||||
|
return Adapter; |
||||
|
}; |
@ -0,0 +1,53 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const Alarms = sequelize.define("alarms", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "ID唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_alarms_id_uindex" |
||||
|
}, |
||||
|
content: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "预警内容", |
||||
|
primaryKey: false, |
||||
|
field: "content", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
level: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "预警等级", |
||||
|
primaryKey: false, |
||||
|
field: "level", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
time: { |
||||
|
type: DataTypes.DATE, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "预警时间", |
||||
|
primaryKey: false, |
||||
|
field: "time", |
||||
|
autoIncrement: false |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_alarms", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.Alarms = Alarms; |
||||
|
return Alarms; |
||||
|
}; |
@ -0,0 +1,124 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const BusinessMetadataDatabase = sequelize.define("businessMetadataDatabase", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_business_metadata_database_id_uindex" |
||||
|
}, |
||||
|
resourceName: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "信息资源名称", |
||||
|
primaryKey: false, |
||||
|
field: "resource_name", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
resourceAbstract: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "信息资源摘要", |
||||
|
primaryKey: false, |
||||
|
field: "resource_abstract", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
resourceProvider: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "信息资源提供方", |
||||
|
primaryKey: false, |
||||
|
field: "resource_provider", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
resourceCategory: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "信息资源分类", |
||||
|
primaryKey: false, |
||||
|
field: "resource_category", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
resourceId: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "信息资源标识符", |
||||
|
primaryKey: false, |
||||
|
field: "resource_id", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
metadataId: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "元数据标识符", |
||||
|
primaryKey: false, |
||||
|
field: "metadata_id", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
createBy: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "创建者", |
||||
|
primaryKey: false, |
||||
|
field: "create_by", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tUser" |
||||
|
} |
||||
|
}, |
||||
|
createAt: { |
||||
|
type: DataTypes.DATE, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "创建时间", |
||||
|
primaryKey: false, |
||||
|
field: "create_at", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
updateAt: { |
||||
|
type: DataTypes.DATE, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "修改时间", |
||||
|
primaryKey: false, |
||||
|
field: "update_at", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
metadataDatabase: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "库表元数据", |
||||
|
primaryKey: false, |
||||
|
field: "metadata_database", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tMetadataDatabase" |
||||
|
} |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_business_metadata_database", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.BusinessMetadataDatabase = BusinessMetadataDatabase; |
||||
|
return BusinessMetadataDatabase; |
||||
|
}; |
@ -0,0 +1,124 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const BusinessMetadataFile = sequelize.define("businessMetadataFile", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_business_metadata_file_id_uindex" |
||||
|
}, |
||||
|
resourceName: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "信息资源名称", |
||||
|
primaryKey: false, |
||||
|
field: "resource_name", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
resourceAbstract: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "信息资源摘要", |
||||
|
primaryKey: false, |
||||
|
field: "resource_abstract", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
resourceProvider: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "信息资源提供方", |
||||
|
primaryKey: false, |
||||
|
field: "resource_provider", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
resourceCategory: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "信息资源分类", |
||||
|
primaryKey: false, |
||||
|
field: "resource_category", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
resourceId: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "信息资源标识符", |
||||
|
primaryKey: false, |
||||
|
field: "resource_id", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
metadataId: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "元数据标识符", |
||||
|
primaryKey: false, |
||||
|
field: "metadata_id", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
createBy: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "创建者", |
||||
|
primaryKey: false, |
||||
|
field: "create_by", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tUser" |
||||
|
} |
||||
|
}, |
||||
|
createAt: { |
||||
|
type: DataTypes.DATE, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "创建时间", |
||||
|
primaryKey: false, |
||||
|
field: "create_at", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
updateAt: { |
||||
|
type: DataTypes.DATE, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "修改时间", |
||||
|
primaryKey: false, |
||||
|
field: "update_at", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
metadataFile: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "文件元数据", |
||||
|
primaryKey: false, |
||||
|
field: "metadata_file", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tMetadataFile" |
||||
|
} |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_business_metadata_file", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.BusinessMetadataFile = BusinessMetadataFile; |
||||
|
return BusinessMetadataFile; |
||||
|
}; |
@ -0,0 +1,124 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const BusinessMetadataRestapi = sequelize.define("businessMetadataRestapi", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_business_metadata_restapi_id_uindex" |
||||
|
}, |
||||
|
resourceName: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "信息资源名称", |
||||
|
primaryKey: false, |
||||
|
field: "resource_name", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
resourceAbstract: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "信息资源摘要", |
||||
|
primaryKey: false, |
||||
|
field: "resource_abstract", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
resourceProvider: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "信息资源提供方", |
||||
|
primaryKey: false, |
||||
|
field: "resource_provider", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
resourceCategory: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "信息资源分类", |
||||
|
primaryKey: false, |
||||
|
field: "resource_category", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
resourceId: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "信息资源标识符", |
||||
|
primaryKey: false, |
||||
|
field: "resource_id", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
metadataId: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "元数据标识符", |
||||
|
primaryKey: false, |
||||
|
field: "metadata_id", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
createBy: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "创建者", |
||||
|
primaryKey: false, |
||||
|
field: "create_by", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tUser" |
||||
|
} |
||||
|
}, |
||||
|
createAt: { |
||||
|
type: DataTypes.DATE, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "创建时间", |
||||
|
primaryKey: false, |
||||
|
field: "create_at", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
updateAt: { |
||||
|
type: DataTypes.DATE, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "修改时间", |
||||
|
primaryKey: false, |
||||
|
field: "update_at", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
metadataRestapi: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "接口元数据", |
||||
|
primaryKey: false, |
||||
|
field: "metadata_restapi", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tMetadataRestapi" |
||||
|
} |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_business_metadata_restapi", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.BusinessMetadataRestapi = BusinessMetadataRestapi; |
||||
|
return BusinessMetadataRestapi; |
||||
|
}; |
@ -0,0 +1,88 @@ |
|||||
|
/* 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 |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_data_source", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.DataSource = DataSource; |
||||
|
return DataSource; |
||||
|
}; |
@ -0,0 +1,107 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const MetaModel = sequelize.define("metaModel", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_meta_model_id_uindex" |
||||
|
}, |
||||
|
modelType: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "元模型类型", |
||||
|
primaryKey: false, |
||||
|
field: "model_type", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
attributeName: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "属性名称", |
||||
|
primaryKey: false, |
||||
|
field: "attribute_name", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
attributeCode: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "属性代码", |
||||
|
primaryKey: false, |
||||
|
field: "attribute_code", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
dataType: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "数据类型", |
||||
|
primaryKey: false, |
||||
|
field: "data_type", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
length: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "长度", |
||||
|
primaryKey: false, |
||||
|
field: "length", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
control: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "输入控件", |
||||
|
primaryKey: false, |
||||
|
field: "control", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
nullable: { |
||||
|
type: DataTypes.BOOLEAN, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "是否允许为空", |
||||
|
primaryKey: false, |
||||
|
field: "nullable", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
readOnly: { |
||||
|
type: DataTypes.BOOLEAN, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "是否只读", |
||||
|
primaryKey: false, |
||||
|
field: "read_only", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
description: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "描述", |
||||
|
primaryKey: false, |
||||
|
field: "description", |
||||
|
autoIncrement: false |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_meta_model", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.MetaModel = MetaModel; |
||||
|
return MetaModel; |
||||
|
}; |
@ -0,0 +1,124 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const MetadataDatabase = sequelize.define("metadataDatabase", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_metadata_database_id_uindex" |
||||
|
}, |
||||
|
name: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "名称", |
||||
|
primaryKey: false, |
||||
|
field: "name", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
code: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "代码", |
||||
|
primaryKey: false, |
||||
|
field: "code", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
type: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "元数据类型", |
||||
|
primaryKey: false, |
||||
|
field: "type", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
description: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "描述(详情)", |
||||
|
primaryKey: false, |
||||
|
field: "description", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
attributesParam: { |
||||
|
type: DataTypes.JSONB, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "属性", |
||||
|
primaryKey: false, |
||||
|
field: "attributes", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
catalog: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "资源目录", |
||||
|
primaryKey: false, |
||||
|
field: "catalog", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tResourceCatalog" |
||||
|
} |
||||
|
}, |
||||
|
parent: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "父级元数据", |
||||
|
primaryKey: false, |
||||
|
field: "parent", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
createBy: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "创建者", |
||||
|
primaryKey: false, |
||||
|
field: "create_by", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tUser" |
||||
|
} |
||||
|
}, |
||||
|
createAt: { |
||||
|
type: DataTypes.DATE, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "创建时间", |
||||
|
primaryKey: false, |
||||
|
field: "create_at", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
updateAt: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "修改时间", |
||||
|
primaryKey: false, |
||||
|
field: "update_at", |
||||
|
autoIncrement: false |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_metadata_database", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.MetadataDatabase = MetadataDatabase; |
||||
|
return MetadataDatabase; |
||||
|
}; |
@ -0,0 +1,115 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const MetadataFile = sequelize.define("metadataFile", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_metadata_file_id_uindex" |
||||
|
}, |
||||
|
name: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "文件名称", |
||||
|
primaryKey: false, |
||||
|
field: "name", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
type: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "文件类型", |
||||
|
primaryKey: false, |
||||
|
field: "type", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
size: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "文件大小", |
||||
|
primaryKey: false, |
||||
|
field: "size", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
description: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "文件描述", |
||||
|
primaryKey: false, |
||||
|
field: "description", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
attributesParam: { |
||||
|
type: DataTypes.JSONB, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "属性", |
||||
|
primaryKey: false, |
||||
|
field: "attributes", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
catalog: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "资源目录", |
||||
|
primaryKey: false, |
||||
|
field: "catalog", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tResourceCatalog" |
||||
|
} |
||||
|
}, |
||||
|
createBy: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "创建者", |
||||
|
primaryKey: false, |
||||
|
field: "create_by", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tUser" |
||||
|
} |
||||
|
}, |
||||
|
createAt: { |
||||
|
type: DataTypes.DATE, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "创建时间", |
||||
|
primaryKey: false, |
||||
|
field: "create_at", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
updateAt: { |
||||
|
type: DataTypes.DATE, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "修改时间", |
||||
|
primaryKey: false, |
||||
|
field: "update_at", |
||||
|
autoIncrement: false |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_metadata_file", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.MetadataFile = MetadataFile; |
||||
|
return MetadataFile; |
||||
|
}; |
@ -0,0 +1,142 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const MetadataRestapi = sequelize.define("metadataRestapi", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_metadata_restapi_id_uindex" |
||||
|
}, |
||||
|
name: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "接口名称", |
||||
|
primaryKey: false, |
||||
|
field: "name", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
url: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "接口路由", |
||||
|
primaryKey: false, |
||||
|
field: "url", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
method: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "请求方法", |
||||
|
primaryKey: false, |
||||
|
field: "method", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
queryParam: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "查询参数", |
||||
|
primaryKey: false, |
||||
|
field: "query_param", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
bodyParam: { |
||||
|
type: DataTypes.JSONB, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "请求实体", |
||||
|
primaryKey: false, |
||||
|
field: "body_param", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
return: { |
||||
|
type: DataTypes.JSONB, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "接口返回值", |
||||
|
primaryKey: false, |
||||
|
field: "return", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
enabled: { |
||||
|
type: DataTypes.BOOLEAN, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "是否已启用", |
||||
|
primaryKey: false, |
||||
|
field: "enabled", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
attributesParam: { |
||||
|
type: DataTypes.JSONB, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "属性", |
||||
|
primaryKey: false, |
||||
|
field: "attributes", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
catalog: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "资源目录", |
||||
|
primaryKey: false, |
||||
|
field: "catalog", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tResourceCatalog" |
||||
|
} |
||||
|
}, |
||||
|
createBy: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "创建者", |
||||
|
primaryKey: false, |
||||
|
field: "create_by", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tUser" |
||||
|
} |
||||
|
}, |
||||
|
createAt: { |
||||
|
type: DataTypes.DATE, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "创建时间", |
||||
|
primaryKey: false, |
||||
|
field: "create_at", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
updateAt: { |
||||
|
type: DataTypes.DATE, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "修改时间", |
||||
|
primaryKey: false, |
||||
|
field: "update_at", |
||||
|
autoIncrement: false |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_metadata_restapi", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.MetadataRestapi = MetadataRestapi; |
||||
|
return MetadataRestapi; |
||||
|
}; |
@ -0,0 +1,84 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const ResourceAccess = sequelize.define("resourceAccess", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "ID唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_resource_access_id_uindex" |
||||
|
}, |
||||
|
resourceName: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "资源名称", |
||||
|
primaryKey: false, |
||||
|
field: "resource_name", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
resourceDesc: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "资源描述", |
||||
|
primaryKey: false, |
||||
|
field: "resource_desc", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
resourceCount: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "资源数", |
||||
|
primaryKey: false, |
||||
|
field: "resource_count", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
resourceType: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "资源类型", |
||||
|
primaryKey: false, |
||||
|
field: "resource_type", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
user: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "访问用户", |
||||
|
primaryKey: false, |
||||
|
field: "user", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tUser" |
||||
|
} |
||||
|
}, |
||||
|
time: { |
||||
|
type: DataTypes.DATE, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "访问时间", |
||||
|
primaryKey: false, |
||||
|
field: "time", |
||||
|
autoIncrement: false |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_resource_access", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.ResourceAccess = ResourceAccess; |
||||
|
return ResourceAccess; |
||||
|
}; |
@ -0,0 +1,62 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const ResourceCatalog = sequelize.define("resourceCatalog", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_resource_catalog_id_uindex" |
||||
|
}, |
||||
|
name: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "名称", |
||||
|
primaryKey: false, |
||||
|
field: "name", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
code: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "代码", |
||||
|
primaryKey: false, |
||||
|
field: "code", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
description: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "描述", |
||||
|
primaryKey: false, |
||||
|
field: "description", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
parent: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "父级目录", |
||||
|
primaryKey: false, |
||||
|
field: "parent", |
||||
|
autoIncrement: false |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_resource_catalog", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.ResourceCatalog = ResourceCatalog; |
||||
|
return ResourceCatalog; |
||||
|
}; |
@ -0,0 +1,124 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const ResourceConsumption = sequelize.define("resourceConsumption", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "ID唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_resource_consumption_id_uindex" |
||||
|
}, |
||||
|
resourceName: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "资源名称", |
||||
|
primaryKey: false, |
||||
|
field: "resource_name", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
resourceType: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "资源类型", |
||||
|
primaryKey: false, |
||||
|
field: "resource_type", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
applyBy: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "申请人", |
||||
|
primaryKey: false, |
||||
|
field: "apply_by", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tUser" |
||||
|
} |
||||
|
}, |
||||
|
applyAt: { |
||||
|
type: DataTypes.DATE, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "申请时间", |
||||
|
primaryKey: false, |
||||
|
field: "apply_at", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
requirements: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "需求描述", |
||||
|
primaryKey: false, |
||||
|
field: "requirements", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
approveState: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "审批状态", |
||||
|
primaryKey: false, |
||||
|
field: "approve_state", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
approveBy: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "审批人", |
||||
|
primaryKey: false, |
||||
|
field: "approve_by", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tUser" |
||||
|
} |
||||
|
}, |
||||
|
approveAt: { |
||||
|
type: DataTypes.DATE, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "审批时间", |
||||
|
primaryKey: false, |
||||
|
field: "approve_at", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
approveRemarks: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "审批意见", |
||||
|
primaryKey: false, |
||||
|
field: "approve_remarks", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
token: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: true, |
||||
|
defaultValue: null, |
||||
|
comment: "令牌", |
||||
|
primaryKey: false, |
||||
|
field: "token", |
||||
|
autoIncrement: false |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_resource_consumption", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.ResourceConsumption = ResourceConsumption; |
||||
|
return ResourceConsumption; |
||||
|
}; |
@ -0,0 +1,48 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const Tag = sequelize.define("tag", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_tag_id_uindex" |
||||
|
}, |
||||
|
name: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "标签名称", |
||||
|
primaryKey: false, |
||||
|
field: "name", |
||||
|
autoIncrement: false |
||||
|
}, |
||||
|
tagSet: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "归属的标签集", |
||||
|
primaryKey: false, |
||||
|
field: "tag_set", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tTagSet" |
||||
|
} |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_tag", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.Tag = Tag; |
||||
|
return Tag; |
||||
|
}; |
@ -0,0 +1,52 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const TagDatabase = sequelize.define("tagDatabase", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_tag_database_id_uindex" |
||||
|
}, |
||||
|
tag: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "标签", |
||||
|
primaryKey: false, |
||||
|
field: "tag", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tTag" |
||||
|
} |
||||
|
}, |
||||
|
database: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "库表元数据", |
||||
|
primaryKey: false, |
||||
|
field: "database", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tMetadataDatabase" |
||||
|
} |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_tag_database", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.TagDatabase = TagDatabase; |
||||
|
return TagDatabase; |
||||
|
}; |
@ -0,0 +1,52 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const TagFile = sequelize.define("tagFile", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_tag_file_id_uindex" |
||||
|
}, |
||||
|
tag: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "标签", |
||||
|
primaryKey: false, |
||||
|
field: "tag", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tTag" |
||||
|
} |
||||
|
}, |
||||
|
file: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "文件元数据", |
||||
|
primaryKey: false, |
||||
|
field: "file", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tMetadataFile" |
||||
|
} |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_tag_file", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.TagFile = TagFile; |
||||
|
return TagFile; |
||||
|
}; |
@ -0,0 +1,52 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const TagRestapi = sequelize.define("tagRestapi", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_tag_restapi_id_uindex" |
||||
|
}, |
||||
|
tag: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "标签", |
||||
|
primaryKey: false, |
||||
|
field: "tag", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tTag" |
||||
|
} |
||||
|
}, |
||||
|
restapi: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "接口元数据", |
||||
|
primaryKey: false, |
||||
|
field: "restapi", |
||||
|
autoIncrement: false, |
||||
|
references: { |
||||
|
key: "id", |
||||
|
model: "tMetadataRestapi" |
||||
|
} |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_tag_restapi", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.TagRestapi = TagRestapi; |
||||
|
return TagRestapi; |
||||
|
}; |
@ -0,0 +1,35 @@ |
|||||
|
/* eslint-disable*/ |
||||
|
|
||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = dc => { |
||||
|
const DataTypes = dc.ORM; |
||||
|
const sequelize = dc.orm; |
||||
|
const TagSet = sequelize.define("tagSet", { |
||||
|
id: { |
||||
|
type: DataTypes.INTEGER, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "唯一标识", |
||||
|
primaryKey: true, |
||||
|
field: "id", |
||||
|
autoIncrement: true, |
||||
|
unique: "t_tag_set_id_uindex" |
||||
|
}, |
||||
|
name: { |
||||
|
type: DataTypes.STRING, |
||||
|
allowNull: false, |
||||
|
defaultValue: null, |
||||
|
comment: "标签集名称", |
||||
|
primaryKey: false, |
||||
|
field: "name", |
||||
|
autoIncrement: false |
||||
|
} |
||||
|
}, { |
||||
|
tableName: "t_tag_set", |
||||
|
comment: "", |
||||
|
indexes: [] |
||||
|
}); |
||||
|
dc.models.TagSet = TagSet; |
||||
|
return TagSet; |
||||
|
}; |
Loading…
Reference in new issue