diff --git a/api/app/lib/index.js b/api/app/lib/index.js index 1ce4a5b..1baeb69 100644 --- a/api/app/lib/index.js +++ b/api/app/lib/index.js @@ -104,6 +104,9 @@ module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Seq LatestDynamicList.belongsTo(AlarmConfirmLog, { foreignKey: 'alarmConfirmId', targetKey: 'id' }); AlarmConfirmLog.hasMany(LatestDynamicList, { foreignKey: 'alarmConfirmId', sourceKey: 'id' }); + AlarmDataContinuityType.belongsTo(AlarmDataContinuity, { foreignKey: 'typeNumber', targetKey: 'type' }) + AlarmDataContinuity.hasOne(AlarmDataContinuityType, { foreignKey: 'typeNumber', targetKey: 'type' }) + LatestDynamicList.belongsTo(ProjectCorrelation, { foreignKey: 'projectCorrelationId', targetKey: 'id' }); ProjectCorrelation.hasMany(LatestDynamicList, { foreignKey: 'projectCorrelationId', sourceKey: 'id' });