.enterprise.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. '!code',
  5. 'dtype',
  6. 'xtype',
  7. '!name',
  8. 'pinyin',
  9. 'logo',
  10. 'license',
  11. 'file_path',
  12. 'contact',
  13. 'addr',
  14. 'introduction',
  15. 'ishomepage',
  16. 'homepage',
  17. 'longitude',
  18. 'latitude',
  19. 'map_info',
  20. 'state',
  21. 'is_del',
  22. 'sort'
  23. ]
  24. },
  25. destroy: {
  26. params: ['!id'],
  27. service: 'delete'
  28. },
  29. update: {
  30. params: ['!id'],
  31. requestBody: [
  32. 'code',
  33. 'dtype',
  34. 'xtype',
  35. 'name',
  36. 'pinyin',
  37. 'logo',
  38. 'license',
  39. 'file_path',
  40. 'contact',
  41. 'addr',
  42. 'introduction',
  43. 'ishomepage',
  44. 'homepage',
  45. 'longitude',
  46. 'latitude',
  47. 'map_info',
  48. 'state',
  49. 'is_del',
  50. 'sort'
  51. ]
  52. },
  53. show: {
  54. parameters: {
  55. params: ['!id']
  56. },
  57. service: 'fetch'
  58. },
  59. index: {
  60. parameters: {
  61. query: {
  62. code : 'code',
  63. dtype : 'dtype',
  64. xtype : 'xtype',
  65. name : 'name',
  66. pinyin : 'pinyin',
  67. logo : 'logo',
  68. license: 'license',
  69. file_path : 'file_path',
  70. contact : 'contact',
  71. addr : 'addr',
  72. introduction: 'introduction',
  73. ishomepage : 'ishomepage',
  74. homepage : 'homepage',
  75. longitude: 'longitude',
  76. latitude : 'latitude',
  77. map_info : 'map_info',
  78. state : 'state',
  79. is_del : 'is_del',
  80. sort : 'sort'
  81. }
  82. },
  83. service: 'query',
  84. options: {
  85. query: ['skip', 'limit'],
  86. sort: ['meta.createdAt'],
  87. desc: true,
  88. count: true
  89. }
  90. },
  91. };