index.js 650 B

12345678910111213141516171819
  1. const express = require('express');
  2. const path = require('path');
  3. const OneToOne = require('../../base/OneToOne');
  4. const CrudModule = require('../../base/CrudModule');
  5. const RepositorySystem = require('../../systems/RepositorySystem');
  6. const RoutingSystem = require('../../systems/RoutingSystem');
  7. const Actions = require('../../systems/ActionSystem');
  8. class CompanyModule extends CrudModule { // this.repository ready!
  9. constructor(){
  10. super('/companies', [3,0,3,4,0], 'Company');
  11. this.repository = RepositorySystem.create('Company');
  12. this.setRepo(this.repository);
  13. new OneToOne('Company', 'Products');
  14. }
  15. }
  16. module.exports = CompanyModule;