.patentnav.js 1.2 KB

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