u
This commit is contained in:
30
src/index.js
Normal file
30
src/index.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import companyuserGetByEmail from './store/companyuser/getByEmail.js';
|
||||
import companyGetByCompanyUserId from './store/company/getByCompanyUserId.js';
|
||||
import categoryGetTree from './store/category/getTree.js';
|
||||
import storePurge from './store/purge.js';
|
||||
import storeInitialize from './store/initialize.js';
|
||||
|
||||
export default class LibDashStore {
|
||||
constructor(pool) {
|
||||
this.pool = pool;
|
||||
|
||||
this.companyuser = {
|
||||
getByEmail: companyuserGetByEmail(pool),
|
||||
};
|
||||
|
||||
this.company = {
|
||||
getByCompanyUserId: companyGetByCompanyUserId(pool),
|
||||
};
|
||||
|
||||
this.category = {
|
||||
getTree: categoryGetTree(pool),
|
||||
};
|
||||
|
||||
this.purge = storePurge(pool);
|
||||
this.initialize = storeInitialize(pool);
|
||||
|
||||
return this.initialize().then(() => this);
|
||||
}
|
||||
}
|
||||
|
||||
export { SCHEMA_SCRIPTS } from './schema.js';
|
||||
Reference in New Issue
Block a user