.product.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. 'name',
  5. 'contacts',
  6. 'phone',
  7. 'qqwx',
  8. 'email',
  9. 'type',
  10. 'status',
  11. 'user_id',
  12. 'field',
  13. 'cooperation',
  14. 'company',
  15. 'condition',
  16. 'image',
  17. 'expect',
  18. 'demand',
  19. 'budget',
  20. 'requirementdesc',
  21. 'present',
  22. 'achievestatus',
  23. 'achieveown',
  24. 'achievesource',
  25. 'intentionprice',
  26. 'patent',
  27. 'roadshow',
  28. 'achievebrief',
  29. 'features',
  30. 'team',
  31. 'messattribute',
  32. 'informationdesc',
  33. 'coreelements',
  34. 'priceinfo',
  35. 'remark',
  36. ],
  37. },
  38. destroy: {
  39. params: ['!id'],
  40. service: 'delete',
  41. },
  42. update: {
  43. params: ['!id'],
  44. requestBody: [
  45. 'name',
  46. 'contacts',
  47. 'phone',
  48. 'qqwx',
  49. 'email',
  50. 'type',
  51. 'status',
  52. 'user_id',
  53. 'field',
  54. 'cooperation',
  55. 'company',
  56. 'condition',
  57. 'image',
  58. 'expect',
  59. 'demand',
  60. 'budget',
  61. 'requirementdesc',
  62. 'present',
  63. 'achievestatus',
  64. 'achieveown',
  65. 'achievesource',
  66. 'intentionprice',
  67. 'patent',
  68. 'roadshow',
  69. 'achievebrief',
  70. 'features',
  71. 'team',
  72. 'messattribute',
  73. 'informationdesc',
  74. 'coreelements',
  75. 'priceinfo',
  76. 'remark',
  77. ],
  78. },
  79. show: {
  80. parameters: {
  81. params: ['!id'],
  82. },
  83. service: 'fetch',
  84. },
  85. index: {
  86. parameters: {
  87. query: {
  88. name: '%name%',
  89. code: 'code',
  90. qqwx: 'qqwx',
  91. type: 'type',
  92. status: 'status',
  93. user_id: 'user_id',
  94. company: 'company',
  95. 'create_time@start': 'create_time@start',
  96. 'create_time@end': 'create_time@end',
  97. },
  98. // options: {
  99. // "meta.state": 0 // 默认条件
  100. // },
  101. },
  102. service: 'query',
  103. options: {
  104. query: ['skip', 'limit'],
  105. sort: ['meta.createdAt'],
  106. desc: true,
  107. count: true,
  108. },
  109. },
  110. import: {
  111. requestBody: ['uri', 'defObject'],
  112. },
  113. };