- feat: Optimize tenancy software architecture.

This commit is contained in:
Ahmed Bouhuolia
2020-08-30 22:11:14 +02:00
parent 74321a2886
commit ca251a2d28
53 changed files with 1581 additions and 1055 deletions

View File

@@ -17,13 +17,12 @@ export default class ItemEntry extends TenantModel {
return ['created_at', 'updated_at'];
}
/**
* Relationship mapping.
*/
static get relationMappings() {
return {
static get virtualAttributes() {
return ['amount'];
}
};
static amount() {
return this.calcAmount(this);
}
static calcAmount(itemEntry) {