|
|
@ -58,7 +58,8 @@ module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Seq |
|
|
|
}); |
|
|
|
|
|
|
|
const { |
|
|
|
AppInspection, ProjectApp, ProjectCorrelation, AppAlarm, App, AlarmAppearRecord, AlarmConfirmLog, EmailSendLog, LatestDynamicList |
|
|
|
AppInspection, ProjectApp, ProjectCorrelation, AppAlarm, App, AlarmAppearRecord, AlarmConfirmLog, EmailSendLog, LatestDynamicList, |
|
|
|
AlarmPushConfig |
|
|
|
} = dc.models; |
|
|
|
|
|
|
|
AppInspection.belongsTo(App, { foreignKey: 'projectAppId', targetKey: 'id' }); |
|
|
@ -77,7 +78,8 @@ module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Seq |
|
|
|
AppAlarm.belongsTo(App, { foreignKey: 'projectAppId', targetKey: 'id' }); |
|
|
|
App.hasMany(AppAlarm, { foreignKey: 'projectAppId', sourceKey: 'id' }); |
|
|
|
|
|
|
|
|
|
|
|
AlarmPushConfig.belongsTo(ProjectCorrelation, { foreignKey: 'pomsProjectId', targetKey: 'id' }); |
|
|
|
ProjectCorrelation.hasMany(AlarmPushConfig, { foreignKey: 'pomsProjectId', sourceKey: 'id' }); |
|
|
|
|
|
|
|
AlarmAppearRecord.belongsTo(ProjectCorrelation, { foreignKey: 'projectCorrelationId', targetKey: 'id' }); |
|
|
|
ProjectCorrelation.hasMany(AlarmAppearRecord, { foreignKey: 'projectCorrelationId', sourceKey: 'id' }); |
|
|
|