mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
- 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:
@@ -1,12 +0,0 @@
|
||||
|
||||
|
||||
export default class TenantEnviroment {
|
||||
|
||||
static get currentTenant() {
|
||||
return this.currentTenantWebsite;
|
||||
}
|
||||
|
||||
static set currentTenant(website) {
|
||||
this.currentTenantWebsite = website;
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
});
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user