Base.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. Ext.define('saas.model.Base', {
  2. extend: 'Ext.data.Model',
  3. // requires: [
  4. // 'Ext.direct.RemotingProvider',
  5. // 'Ext.data.identifier.Uuid'
  6. // ],
  7. // fields: [
  8. // { name: 'url', calculate: function (data) {
  9. // return Ext.String.format('{0:lowercase}/{1}',
  10. // this.owner.entityName,
  11. // data.id);
  12. // }}
  13. // ],
  14. // schema: {
  15. // namespace: 'saas.model',
  16. // proxy: {
  17. // type: 'direct',
  18. // api: {
  19. // create: 'insert',
  20. // read: 'list',
  21. // update: 'update',
  22. // destroy: 'remove'
  23. // },
  24. // reader: {
  25. // type: 'json',
  26. // rootProperty: 'data',
  27. // messageProperty: 'message'
  28. // }
  29. // }
  30. // },
  31. // toUrl: function() {
  32. // return this.get('url');
  33. // },
  34. // toEditUrl: function() {
  35. // return this.toUrl() + '/edit';
  36. // }
  37. });