merging create grant and stripe calls

This commit is contained in:
Arjun Patel
2019-02-02 19:33:44 -08:00
parent 49c470ab47
commit 226f5c1149
9 changed files with 112 additions and 27 deletions
+8 -2
View File
@@ -28,9 +28,15 @@ module.exports = models => {
foreignKey: 'grant_id',
otherKey: 'organization_id'
});
Grant.hasMany(Charge, { foreignKey: 'grant_id' });
Donor.hasOne(PaymentPlan, {
foreignKey: 'user_id'
Donor.hasMany(PaymentPlan, {
foreignKey: 'subscription_id',
sourceKey: 'subscription_id'
});
Grant.hasOne(PaymentPlan, {
foreignKey: 'grant_id'
});
};