This commit is contained in:
seb
2026-07-31 00:08:50 +02:00
parent 93e52cd513
commit 6bdac7e543
17 changed files with 520 additions and 24 deletions

30
src/index.js Normal file
View 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';