This commit is contained in:
Ahmed Bouhuolia
2020-03-19 17:02:37 +02:00
parent 73711384f6
commit ab81f4be40
57 changed files with 3734 additions and 515 deletions

View File

@@ -17,6 +17,11 @@ export default class Account extends BaseModel {
*/
static get modifiers() {
return {
filterAccounts(query, accountIds) {
if (accountIds.length > 0) {
query.whereIn('id', accountIds);
}
},
filterAccountTypes(query, typesIds) {
if (typesIds.length > 0) {
query.whereIn('accoun_type_id', typesIds);