.group.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. module.exports = {
  2. create: {
  3. requestBody: ['person_limit', 'shop', 'goods', 'goodsSpec', 'leader', 'persons', 'status'],
  4. },
  5. destroy: {
  6. params: ['!id'],
  7. service: 'delete',
  8. },
  9. update: {
  10. params: ['!id'],
  11. requestBody: ['person_limit', 'shop', 'goods', 'goodsSpec', 'leader', 'persons', '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. shop: 'shop',
  25. goods: 'goods._id',
  26. goodsSpec: 'goodsSpec._id',
  27. person: 'persons.customer',
  28. leader: 'leader',
  29. status: 'status',
  30. },
  31. // options: {
  32. // 'persons.status': '0', // 默认条件
  33. // },
  34. },
  35. service: 'query',
  36. options: {
  37. query: ['skip', 'limit'],
  38. sort: ['meta.createdAt'],
  39. desc: true,
  40. count: true,
  41. },
  42. },
  43. getGroup: {
  44. parameters: {
  45. query: {
  46. order_id: 'order_id',
  47. },
  48. },
  49. },
  50. };