mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
feat: licenses administration basic authentication.
feat: accounts slug. feat: duplicate accounts_balance table and merge balance with accounts table. feat: refactoring customers and vendors. feat: system user soft deleting. feat: preventing build tenant database without any subscription. feat: remove 'password' property from 'req.user' object. feat: refactoring JournalPoster class. feat: delete duplicated directories and files.
This commit is contained in:
@@ -15,6 +15,8 @@ exports.up = function (knex) {
|
||||
|
||||
table.date('invite_accepted_at');
|
||||
table.date('last_login_at');
|
||||
|
||||
table.dateTime('deleted_at');
|
||||
table.timestamps();
|
||||
}).then(() => {
|
||||
// knex.seed.run({
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import SystemModel from '@/system/models/SystemModel';
|
||||
|
||||
export default class SubscriptionPlan extends SystemModel {
|
||||
/**
|
||||
* Table name
|
||||
*/
|
||||
static get tableName() {
|
||||
return 'subscriptions_plans';
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
import { mixin } from 'objection';
|
||||
import SystemModel from '@/system/models/SystemModel';
|
||||
|
||||
export default class Option extends SystemModel {
|
||||
/**
|
||||
* Table name.
|
||||
*/
|
||||
static get tableName() {
|
||||
return 'options';
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,14 @@
|
||||
import { Model, mixin } from 'objection';
|
||||
import bcrypt from 'bcryptjs';
|
||||
import SoftDelete from 'objection-soft-delete';
|
||||
import SystemModel from '@/system/models/SystemModel';
|
||||
import moment from 'moment';
|
||||
|
||||
|
||||
export default class SystemUser extends mixin(SystemModel) {
|
||||
export default class SystemUser extends mixin(SystemModel, [SoftDelete({
|
||||
columnName: 'deleted_at',
|
||||
deletedValue: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
notDeletedValue: null,
|
||||
})]) {
|
||||
/**
|
||||
* Table name.
|
||||
*/
|
||||
@@ -25,6 +30,9 @@ export default class SystemUser extends mixin(SystemModel) {
|
||||
const Tenant = require('@/system/models/Tenant');
|
||||
|
||||
return {
|
||||
/**
|
||||
* System user may belongs to tenant model.
|
||||
*/
|
||||
tenant: {
|
||||
relation: Model.BelongsToOneRelation,
|
||||
modelClass: Tenant.default,
|
||||
|
||||
Reference in New Issue
Block a user