.config.js 712 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. module.exports = {
  2. create: {
  3. requestBody: ['title','type','setting','remark']
  4. },
  5. destroy: {
  6. params: ["!id"],
  7. service: "delete"
  8. },
  9. update: {
  10. params: ["!id"],
  11. requestBody:['title','type','setting','remark']
  12. },
  13. show: {
  14. parameters: {
  15. params: ["!id"]
  16. },
  17. service: "fetch"
  18. },
  19. index: {
  20. parameters: {
  21. query: {
  22. "create_time@start": "create_time@start",
  23. "create_time@end": "create_time@end",
  24. },
  25. },
  26. service: "query",
  27. options: {
  28. query: ["skip", "limit"],
  29. sort: ["meta.createdAt"],
  30. desc: true,
  31. count: true,
  32. },
  33. },
  34. getOne: {
  35. parameters: {
  36. params: ["!type"]
  37. },
  38. service: "getOne"
  39. },
  40. }