.tradeorder.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. "order_num",
  5. "buyer_id",
  6. "buyer_contacts",
  7. "buyer_phone",
  8. "buyer_email",
  9. "type",
  10. "sell",
  11. "purchase",
  12. "status",
  13. "remark",
  14. ],
  15. },
  16. destroy: {
  17. params: ["!id"],
  18. service: "delete",
  19. },
  20. update: {
  21. params: ["!id"],
  22. requestBody: [
  23. "order_num",
  24. "buyer_id",
  25. "buyer_contacts",
  26. "buyer_phone",
  27. "buyer_email",
  28. "type",
  29. "sell",
  30. "purchase",
  31. "status",
  32. "remark",
  33. ],
  34. },
  35. show: {
  36. parameters: {
  37. params: ["!id"],
  38. },
  39. service: "fetch",
  40. },
  41. index: {
  42. parameters: {
  43. query: {
  44. order_num: "order_num",
  45. buyer_contacts: "buyer_contacts",
  46. buyer_phone: "buyer_phone",
  47. buyer_email: "buyer_email",
  48. type: "type",
  49. status: "status",
  50. remark: "remark",
  51. },
  52. // options: {
  53. // "meta.state": 0 // 默认条件
  54. // },
  55. },
  56. service: "query",
  57. options: {
  58. query: ["skip", "limit"],
  59. sort: ["meta.createdAt"],
  60. desc: true,
  61. count: true,
  62. },
  63. },
  64. };