.storeGoods.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. module.exports = {
  2. create: {
  3. requestBody: ['customer', 'goods', 'time'],
  4. },
  5. destroy: {
  6. params: ['!id'],
  7. service: 'delete',
  8. },
  9. update: {
  10. params: ['!id'],
  11. requestBody: ['customer', 'goods', 'time'],
  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. customer: 'customer',
  25. goods: 'goods',
  26. 'time@start': 'time@start',
  27. 'time@end': 'time@end',
  28. },
  29. // options: {
  30. // "meta.state": 0 // 默认条件
  31. // },
  32. },
  33. service: 'query',
  34. options: {
  35. query: ['skip', 'limit'],
  36. sort: ['time'],
  37. desc: true,
  38. count: true,
  39. },
  40. },
  41. check: {
  42. parameters: {
  43. query: {
  44. customer: 'customer',
  45. goods: 'goods',
  46. },
  47. },
  48. },
  49. userView: {
  50. parameters: {},
  51. options: {
  52. query: ['skip', 'limit'],
  53. sort: ['time'],
  54. desc: true,
  55. count: true,
  56. },
  57. },
  58. };