mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
20 lines
619 B
JavaScript
20 lines
619 B
JavaScript
import Bookshelf from 'bookshelf';
|
|
import jsonColumns from 'bookshelf-json-columns';
|
|
import bookshelfParanoia from 'bookshelf-paranoia';
|
|
import bookshelfModelBase from 'bookshelf-modelbase';
|
|
import cascadeDelete from 'bookshelf-cascade-delete';
|
|
import knex from '../database/knex';
|
|
|
|
const bookshelf = Bookshelf(knex);
|
|
|
|
bookshelf.plugin('pagination');
|
|
bookshelf.plugin('visibility');
|
|
bookshelf.plugin('registry');
|
|
bookshelf.plugin('virtuals');
|
|
bookshelf.plugin(jsonColumns);
|
|
bookshelf.plugin(bookshelfParanoia);
|
|
bookshelf.plugin(bookshelfModelBase.pluggable);
|
|
bookshelf.plugin(cascadeDelete);
|
|
|
|
export default bookshelf;
|