feat: Ability to hide/show financial statement header.

This commit is contained in:
Ahmed Bouhuolia
2020-05-27 20:21:05 +02:00
parent 2e8ffa2aa9
commit c1659d191f
47 changed files with 914 additions and 301 deletions

View File

@@ -0,0 +1,28 @@
exports.up = function(knex) {
return knex.schema.createTable('subscriptions_plans', table => {
table.increments();
table.string('name');
table.string('description');
table.decimal('price');
table.decimal('signup_fee');
table.string('currency', 3);
table.integer('trial_period');
table.string('trial_interval');
table.integer('invoice_period');
table.string('invoice_interval');
table.timestamps();
}).then(() => {
return knex.seed.run({
specific: 'seed_subscriptions_plans.js'
})
});
};
exports.down = function(knex) {
return knex.schema.dropTableIfExists('subscriptions_plans')
};

View File

@@ -0,0 +1,18 @@
exports.up = function(knex) {
return knex.schema.createTable('subscriptions_usage', table => {
table.increments();
table.integer('user_id');
table.integer('plan_id');
table.dateTime('trial_ends_at');
table.dateTime('subscription_starts_at');
table.dateTime('subscription_ends_at');
table.timestamps();
});
};
exports.down = function(knex) {
return knex.schema.dropTableIfExists('subscriptions_usage');
};

View File

@@ -0,0 +1,14 @@
exports.up = function(knex) {
return knex.schema.createTable('subscription_licenses', table => {
table.increments();
table.string('key');
table.integer('license_period');
table.string('license_interval');
table.boolean('used').defaultTo(false);
});
};
exports.down = function(knex) {
return knex.schema.dropTableIfExists('subscription_licenses');
};