|
@ -65,6 +65,9 @@ module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Seq |
|
|
PatrolRecordIssueHandle.belongsTo(PatrolRecord, { foreignKey: 'patrolRecordId', targetKey: 'id' }); |
|
|
PatrolRecordIssueHandle.belongsTo(PatrolRecord, { foreignKey: 'patrolRecordId', targetKey: 'id' }); |
|
|
PatrolRecord.hasMany(PatrolRecordIssueHandle, { foreignKey: 'patrolRecordId', sourceKey: 'id' }); |
|
|
PatrolRecord.hasMany(PatrolRecordIssueHandle, { foreignKey: 'patrolRecordId', sourceKey: 'id' }); |
|
|
|
|
|
|
|
|
|
|
|
PatrolRecord.belongsTo(Point, { foreignKey: 'pointId', targetKey: 'id' }); |
|
|
|
|
|
Point.hasMany(PatrolRecord, { foreignKey: 'pointId', sourceKey: 'id' }); |
|
|
|
|
|
|
|
|
UserResource.belongsTo(User, { foreignKey: 'userId', targetKey: 'id' }); |
|
|
UserResource.belongsTo(User, { foreignKey: 'userId', targetKey: 'id' }); |
|
|
User.hasMany(UserResource, { foreignKey: 'userId', sourceKey: 'id' }); |
|
|
User.hasMany(UserResource, { foreignKey: 'userId', sourceKey: 'id' }); |
|
|
|
|
|
|
|
|