mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
refactoring: custom views service.
fix: constraints of delete item from storage. fix: constraints of delete item category from storage. fix: localize database seeds files. fix: view meta data in accounts list response.
This commit is contained in:
@@ -10,6 +10,10 @@ export default class ItemCategory extends TenantModel {
|
||||
return 'items_categories';
|
||||
}
|
||||
|
||||
static get resourceable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Timestamps columns.
|
||||
*/
|
||||
@@ -37,4 +41,43 @@ export default class ItemCategory extends TenantModel {
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
static get fields() {
|
||||
return {
|
||||
name: {
|
||||
column: 'name',
|
||||
},
|
||||
description: {
|
||||
column: 'description',
|
||||
},
|
||||
parent_category_id: {
|
||||
column: 'parent_category_id',
|
||||
relation: 'items_categories.id',
|
||||
relationColumn: 'items_categories.id',
|
||||
},
|
||||
user: {
|
||||
column: 'user_id',
|
||||
relation: 'users.id',
|
||||
relationColumn: 'users.id',
|
||||
},
|
||||
cost_account: {
|
||||
column: 'cost_account_id',
|
||||
relation: 'accounts.id',
|
||||
},
|
||||
sell_account: {
|
||||
column: 'sell_account_id',
|
||||
relation: 'accounts.id',
|
||||
},
|
||||
inventory_account: {
|
||||
column: 'inventory_account_id',
|
||||
relation: 'accounts.id',
|
||||
},
|
||||
cost_method: {
|
||||
column: 'cost_method',
|
||||
},
|
||||
created_at: {
|
||||
column: 'created_at',
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user