|
|
@ -69,6 +69,8 @@ module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Seq |
|
|
|
|
|
|
|
ProjectCorrelation.belongsToMany(App, { through: ProjectApp, foreignKey: 'projectId', otherKey: 'appId' }); |
|
|
|
|
|
|
|
App.belongsToMany(ProjectCorrelation, { through: ProjectApp, foreignKey: 'appId', otherKey: 'projectId' }); |
|
|
|
|
|
|
|
AppAlarm.belongsTo(App, { foreignKey: 'projectAppId', targetKey: 'id' }); |
|
|
|
App.hasMany(AppAlarm, { foreignKey: 'projectAppId', sourceKey: 'id' }); |
|
|
|
}; |
|
|
|