feat: add models fields labels.

This commit is contained in:
Ahmed Bouhuolia
2020-10-17 19:11:51 +02:00
parent 078098c593
commit bd2ce7ccee
7 changed files with 86 additions and 7 deletions

View File

@@ -42,40 +42,52 @@ export default class ItemCategory extends TenantModel {
};
}
/**
* Item category fields.
*/
static get fields() {
return {
name: {
label: 'Name',
column: 'name',
},
description: {
label: 'Description',
column: 'description',
},
parent_category_id: {
label: 'Parent category',
column: 'parent_category_id',
relation: 'items_categories.id',
relationColumn: 'items_categories.id',
},
user: {
label: 'User',
column: 'user_id',
relation: 'users.id',
relationColumn: 'users.id',
},
cost_account: {
label: 'Cost account',
column: 'cost_account_id',
relation: 'accounts.id',
},
sell_account: {
label: 'Sell account',
column: 'sell_account_id',
relation: 'accounts.id',
},
inventory_account: {
label: 'Inventory account',
column: 'inventory_account_id',
relation: 'accounts.id',
},
cost_method: {
label: 'Cost method',
column: 'cost_method',
},
created_at: {
label: 'Created at',
column: 'created_at',
},
};