.goodsJoinAct.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. module.exports = {
  2. create: {
  3. requestBody: ['platform_act', 'spec', 'platform_act_type', 'shop', 'goods', 'config', 'status'],
  4. },
  5. destroy: {
  6. params: ['!id'],
  7. service: 'delete',
  8. },
  9. update: {
  10. params: ['!id'],
  11. requestBody: ['platform_act', 'platform_act_type', 'shop', 'config', 'status'],
  12. },
  13. show: {
  14. parameters: {
  15. params: ['!id'],
  16. },
  17. service: 'fetch',
  18. },
  19. index: {
  20. parameters: {
  21. query: {
  22. 'meta.createdAt@start': 'meta.createdAt@start',
  23. 'meta.createdAt@end': 'meta.createdAt@end',
  24. platform_act: 'platform_act',
  25. platform_act_type: 'platform_act_type',
  26. shop: 'shop',
  27. shop_name: 'shop_name',
  28. goods: 'goods',
  29. goods_name: 'goods_name',
  30. spec: 'spec',
  31. spec_name: 'spec_name',
  32. status: 'status',
  33. tags: 'tags',
  34. act_tags: 'act_tags',
  35. goods_type: 'goods_type',
  36. },
  37. // options: {
  38. // "meta.state": 0 // 默认条件
  39. // },
  40. },
  41. service: 'query',
  42. options: {
  43. query: ['skip', 'limit'],
  44. sort: ['meta.createdAt'],
  45. desc: true,
  46. count: true,
  47. },
  48. },
  49. };