mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: items list restful api.
This commit is contained in:
@@ -91,14 +91,17 @@ factory.define('item_metadata', 'items_metadata', async () => {
|
||||
|
||||
factory.define('item', 'items', async () => {
|
||||
const category = await factory.create('item_category');
|
||||
const account = await factory.create('account');
|
||||
const costAccount = await factory.create('account');
|
||||
const sellAccount = await factory.create('account');
|
||||
const inventoryAccount = await factory.create('account');
|
||||
return {
|
||||
name: faker.lorem.word(),
|
||||
note: faker.lorem.paragraph(),
|
||||
cost_price: faker.random.number(),
|
||||
sell_price: faker.random.number(),
|
||||
cost_account_id: account.id,
|
||||
sell_account_id: account.id,
|
||||
cost_account_id: costAccount.id,
|
||||
sell_account_id: sellAccount.id,
|
||||
inventory_account_id: inventoryAccount.id,
|
||||
category_id: category.id,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -10,6 +10,7 @@ exports.up = function (knex) {
|
||||
table.string('picture_uri');
|
||||
table.integer('cost_account_id').unsigned();
|
||||
table.integer('sell_account_id').unsigned();
|
||||
table.integer('inventory_account_id').unsigned();
|
||||
table.text('note').nullable();
|
||||
table.integer('category_id').unsigned();
|
||||
table.integer('user_id').unsigned();
|
||||
|
||||
Reference in New Issue
Block a user