fix: record expense, item and item category date session.

fix: delete bulk accounts.
fix: activate/inactive bulk accounts.
This commit is contained in:
Ahmed Bouhuolia
2020-09-28 23:06:29 +02:00
parent ad51d12572
commit 4732fa1d21
5 changed files with 24 additions and 28 deletions

View File

@@ -39,21 +39,9 @@ export default class Plan extends mixin(SystemModel) {
* Relationship mapping.
*/
static get relationMappings() {
const PlanFeature = require('system/models/Subscriptions/PlanFeature');
const PlanSubscription = require('system/models/Subscriptions/PlanSubscription');
return {
/**
* The plan may have many features.
*/
features: {
relation: Model.BelongsToOneRelation,
modelClass: PlanFeature.default,
join: {
from: 'subscriptions_plans.id',
to: 'subscriptions_plan_features.planId',
},
},
/**
* The plan may have many subscriptions.
*/
@@ -62,7 +50,7 @@ export default class Plan extends mixin(SystemModel) {
modelClass: PlanSubscription.default,
join: {
from: 'subscription_plans.id',
to: 'subscription_plans.planId',
to: 'subscription_plan_subscriptions.planId',
},
}
};