.road_show.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. "user_id",
  5. "dock_id",
  6. "title",
  7. "brief",
  8. "origin",
  9. "publish_time",
  10. "content",
  11. "picture",
  12. "filepath",
  13. "remark"
  14. ],
  15. },
  16. destroy: {
  17. params: ["!id"],
  18. service: "delete",
  19. },
  20. update: {
  21. params: ["!id"],
  22. requestBody: [
  23. "user_id",
  24. "dock_id",
  25. "title",
  26. "brief",
  27. "origin",
  28. "publish_time",
  29. "content",
  30. "picture",
  31. "filepath",
  32. "remark"
  33. ],
  34. },
  35. show: {
  36. parameters: {
  37. params: ["!id"],
  38. },
  39. service: "fetch",
  40. },
  41. index: {
  42. parameters: {
  43. query: {
  44. dock_id:"dock_id",
  45. title:"%title%",
  46. origin:"origin",
  47. "publish_time@start":"publish_time@start",
  48. "publish_time@end":"publish_time@end",
  49. "create_time@start": "create_time@start",
  50. "create_time@end": "create_time@end",
  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. };