- feat: remove unnecessary migrations, controllers and models files.

- feat: metable store
- feat: metable store with settings store.
- feat: settings middleware to auto-save and load.
- feat: DI db manager to master container.
- feat: write some logs to sale invoices.
This commit is contained in:
Ahmed Bouhuolia
2020-09-03 16:51:48 +02:00
parent abefba22ee
commit 9ee7ed89ec
98 changed files with 1697 additions and 2052 deletions

View File

@@ -1,12 +0,0 @@
export default class TenantEnviroment {
static get currentTenant() {
return this.currentTenantWebsite;
}
static set currentTenant(website) {
this.currentTenantWebsite = website;
}
}

View File

@@ -3,6 +3,7 @@ exports.up = function(knex) {
return knex.schema.createTable('tenants', (table) => {
table.bigIncrements();
table.string('organization_id');
table.boolean('initialized').defaultTo(false);
table.timestamps();
});
};

View File

@@ -1,6 +1,5 @@
import { mixin } from 'objection';
import SystemModel from '@/system/models/SystemModel';
import MetableCollection from '@/lib/Metable/MetableCollection';
export default class Option extends SystemModel {
/**
@@ -9,21 +8,4 @@ export default class Option extends SystemModel {
static get tableName() {
return 'options';
}
/**
* Override the model query.
* @param {...any} args -
*/
static query(...args) {
return super.query(...args).runAfter((result) => {
if (result instanceof MetableCollection) {
result.setModel(Option);
}
return result;
});
}
static get collection() {
return MetableCollection;
}
}