using the sequelize auto index file for model/db config
This commit is contained in:
+2
-13
@@ -7,23 +7,12 @@ module.exports = models => {
|
||||
Organization,
|
||||
Charge,
|
||||
PaymentPlan,
|
||||
GrantsOrganizations
|
||||
GrantsOrganizations,
|
||||
Project
|
||||
} = models;
|
||||
|
||||
Donor.hasMany(Grant, { foreignKey: 'donor_id' });
|
||||
|
||||
Grant.belongsToMany(Cause, {
|
||||
through: 'grants_causes',
|
||||
foreignKey: 'grant_id',
|
||||
otherKey: 'cause_id'
|
||||
});
|
||||
|
||||
Grant.belongsToMany(Region, {
|
||||
through: 'grants_regions',
|
||||
foreignKey: 'grant_id',
|
||||
otherKey: 'region_id'
|
||||
});
|
||||
|
||||
Grant.belongsToMany(Organization, {
|
||||
through: 'grants_organizations',
|
||||
foreignKey: 'grant_id',
|
||||
|
||||
Reference in New Issue
Block a user