stream.js 719 B

1234567891011121314151617181920212223242526272829
  1. const Backbone = require('backbone');
  2. const model = Backbone.Model.extend({
  3. idAttribute: 'id',
  4. defaults: function () {
  5. return {
  6. id: undefined,
  7. created_on: null,
  8. modified_on: null,
  9. incoming_port: null,
  10. forwarding_host: null,
  11. forwarding_port: null,
  12. tcp_forwarding: true,
  13. udp_forwarding: false,
  14. enabled: true,
  15. meta: {},
  16. // The following are expansions:
  17. owner: null
  18. };
  19. }
  20. });
  21. module.exports = {
  22. Model: model,
  23. Collection: Backbone.Collection.extend({
  24. model: model
  25. })
  26. };