mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: Exchange rates CRUD.
This commit is contained in:
@@ -250,6 +250,14 @@ factory.define('currency', 'currencies', async () => {
|
||||
};
|
||||
});
|
||||
|
||||
factory.define('exchange_rate', 'exchange_rates', async () => {
|
||||
return {
|
||||
date: '2020-02-02',
|
||||
currency_code: 'USD',
|
||||
exchange_rate: faker.random.number(),
|
||||
};
|
||||
});
|
||||
|
||||
factory.define('budget', 'budgets', async () => {
|
||||
return {
|
||||
name: faker.lorem.slug(),
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
exports.up = function(knex) {
|
||||
return knex.schema.createTable('exchange_rates', table => {
|
||||
table.increments();
|
||||
table.string('currency_code', 4);
|
||||
table.decimal('exchange_rate');
|
||||
table.date('date');
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = function(knex) {
|
||||
return knex.schema.dropTableIfExists('exchange_rates');
|
||||
};
|
||||
Reference in New Issue
Block a user