.order.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. "order_no",
  5. "!owner",
  6. "principal",
  7. "!client",
  8. "rq_send_time",
  9. "send_time",
  10. "rq_arrive_time",
  11. "arrive_time",
  12. "pre_money",
  13. "goods",
  14. "split",
  15. "goods_bill",
  16. "in_bill",
  17. "out_bill",
  18. "is_js",
  19. "goods_status",
  20. "status",
  21. "remark",
  22. ],
  23. },
  24. destroy: {
  25. params: ["!id"],
  26. service: "delete",
  27. },
  28. update: {
  29. params: ["!id"],
  30. requestBody: [
  31. "order_no",
  32. "!owner",
  33. "principal",
  34. "!client",
  35. "rq_send_time",
  36. "send_time",
  37. "rq_arrive_time",
  38. "arrive_time",
  39. "pre_money",
  40. "goods",
  41. "split",
  42. "goods_bill",
  43. "in_bill",
  44. "out_bill",
  45. "is_js",
  46. "goods_status",
  47. "status",
  48. "remark",
  49. ],
  50. },
  51. show: {
  52. parameters: {
  53. params: ["!id"],
  54. },
  55. service: "fetch",
  56. },
  57. index: {
  58. parameters: {
  59. query: {
  60. order_no: "%order_no%",
  61. owner: "owner",
  62. principal:"principal",
  63. client: "client",
  64. "rq_send_time@start": "rq_send_time@start",
  65. "rq_send_time@end": "rq_send_time@end",
  66. "rq_arrive_time@start": "rq_arrive_time@start",
  67. is_js: "is_js",
  68. status: "status",
  69. },
  70. },
  71. service: "query",
  72. options: {
  73. query: ["skip", "limit"],
  74. sort: ["meta.createdAt"],
  75. desc: true,
  76. count: true,
  77. },
  78. },
  79. };