mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: Vendors resource.
This commit is contained in:
@@ -300,5 +300,11 @@ export default (tenantDb) => {
|
||||
};
|
||||
});
|
||||
|
||||
factory.define('vendor', 'vendors', async () => {
|
||||
return {
|
||||
customer_type: 'business',
|
||||
};
|
||||
});
|
||||
|
||||
return factory;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
|
||||
exports.up = function(knex) {
|
||||
return knex.schema.createTable('vendors', table => {
|
||||
table.increments();
|
||||
|
||||
table.string('customer_type');
|
||||
table.string('first_name').nullable();
|
||||
table.string('last_name').nullable();
|
||||
table.string('company_name').nullable();
|
||||
|
||||
table.string('display_name');
|
||||
|
||||
table.string('email').nullable();
|
||||
table.string('work_phone').nullable();
|
||||
table.string('personal_phone').nullable();
|
||||
|
||||
table.string('billing_address_1').nullable();
|
||||
table.string('billing_address_2').nullable();
|
||||
table.string('billing_address_city').nullable();
|
||||
table.string('billing_address_country').nullable();
|
||||
table.string('billing_address_email').nullable();
|
||||
table.string('billing_address_zipcode').nullable();
|
||||
table.string('billing_address_phone').nullable();
|
||||
table.string('billing_address_state').nullable(),
|
||||
|
||||
table.string('shipping_address_1').nullable();
|
||||
table.string('shipping_address_2').nullable();
|
||||
table.string('shipping_address_city').nullable();
|
||||
table.string('shipping_address_country').nullable();
|
||||
table.string('shipping_address_email').nullable();
|
||||
table.string('shipping_address_zipcode').nullable();
|
||||
table.string('shipping_address_phone').nullable();
|
||||
table.string('shipping_address_state').nullable();
|
||||
|
||||
table.text('note');
|
||||
table.boolean('active').defaultTo(true);
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = function(knex) {
|
||||
return knex.schema.dropTableIfExists('vendors');
|
||||
};
|
||||
@@ -11,6 +11,7 @@ exports.seed = (knex) => {
|
||||
{ id: 4, name: 'manual_journals' },
|
||||
{ id: 5, name: 'items_categories' },
|
||||
{ id: 6, name: 'customers' },
|
||||
{ id: 7, name: 'vendors' },
|
||||
]);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user