unnecessary associations, rather do references
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
module.exports = models => {
|
||||
const {
|
||||
donor,
|
||||
Grant,
|
||||
Cause,
|
||||
Region,
|
||||
Organization,
|
||||
Charge,
|
||||
PaymentPlan,
|
||||
GrantsOrganizations,
|
||||
Project
|
||||
} = models;
|
||||
console.log(models);
|
||||
|
||||
donor.hasMany(Grant, { foreignKey: 'donor_id' });
|
||||
|
||||
Grant.belongsToMany(Organization, {
|
||||
through: 'Grant_Organization',
|
||||
foreignKey: 'grant_id',
|
||||
otherKey: 'organization_id'
|
||||
});
|
||||
|
||||
Grant.hasMany(Charge, { foreignKey: 'grant_id' });
|
||||
};
|
||||
Reference in New Issue
Block a user