stream.js 699 B

123456789101112131415161718192021222324252627282930
  1. 'use strict';
  2. const Backbone = require('backbone');
  3. const model = Backbone.Model.extend({
  4. idAttribute: 'id',
  5. defaults: function () {
  6. return {
  7. id: undefined,
  8. created_on: null,
  9. modified_on: null,
  10. incoming_port: null,
  11. forward_ip: null,
  12. forwarding_port: null,
  13. tcp_forwarding: true,
  14. udp_forwarding: false,
  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. };