.interview.js 1017 B

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