.shopInBill.js 876 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. module.exports = {
  2. create: {
  3. requestBody: ['total', 'receipts', 'shop', 'cut', 'time', 'source', 'source_id'],
  4. },
  5. destroy: {
  6. params: ['!id'],
  7. service: 'delete',
  8. },
  9. update: {
  10. params: ['!id'],
  11. requestBody: ['total', 'receipts', 'shop', 'cut', 'time', 'source', 'source_id'],
  12. },
  13. show: {
  14. parameters: {
  15. params: ['!id'],
  16. },
  17. service: 'fetch',
  18. },
  19. index: {
  20. parameters: {
  21. query: {
  22. 'time@start': 'time@start',
  23. 'time@end': 'time@end',
  24. shop: 'shop',
  25. source: 'source',
  26. source_id: 'source_id',
  27. },
  28. // options: {
  29. // "meta.state": 0 // 默认条件
  30. // },
  31. },
  32. service: 'query',
  33. options: {
  34. query: ['skip', 'limit'],
  35. sort: ['meta.createdAt'],
  36. desc: true,
  37. count: true,
  38. },
  39. },
  40. computedTotal: {
  41. params: ['!shop'],
  42. },
  43. };