index.js 784 B

1234567891011121314151617181920212223242526272829303132333435
  1. const express = require('express');
  2. const path = require('path');
  3. const CrudModule = require('../../base/CrudModule');
  4. const ManyToMany = require('../../base/ManyToMany');
  5. const RepositorySystem = require('../../systems/RepositorySystem');
  6. const RoutingSystem = require('../../systems/RoutingSystem');
  7. const Actions = require('../../systems/ActionSystem');
  8. let PrinterScheme = {
  9. fields: [
  10. {
  11. key:"description",
  12. type: "text"
  13. },
  14. {
  15. key: "image",
  16. type: "text"
  17. }
  18. ]
  19. };
  20. class PrinterModule extends CrudModule {
  21. constructor(){
  22. super('/printers', [3,0,3,4,0], 'Printers', '');
  23. this.repository = RepositorySystem.create('Printers', PrinterScheme);
  24. this.setRepo(this.repository);
  25. //new ManyToMany('Printers', 'Products');
  26. }
  27. }
  28. module.exports = PrinterModule;