stream.js 819 B

1234567891011121314151617181920212223242526272829303132
  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. certificate_id: 0,
  17. domain_names: [],
  18. // The following are expansions:
  19. owner: null,
  20. certificate: null
  21. };
  22. }
  23. });
  24. module.exports = {
  25. Model: model,
  26. Collection: Backbone.Collection.extend({
  27. model: model
  28. })
  29. };