.school.js 950 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. "code",
  5. "name",
  6. "shortname",
  7. "logourl",
  8. "level",
  9. "address",
  10. "number",
  11. "hascar",
  12. ],
  13. },
  14. destroy: {
  15. params: ["!id"],
  16. service: "delete",
  17. },
  18. update: {
  19. params: ["!id"],
  20. requestBody: [
  21. "code",
  22. "name",
  23. "shortname",
  24. "logourl",
  25. "level",
  26. "address",
  27. "number",
  28. "hascar",
  29. ],
  30. },
  31. show: {
  32. parameters: {
  33. params: ["!id"],
  34. },
  35. service: "fetch",
  36. },
  37. index: {
  38. parameters: {
  39. query: {
  40. code: "code",
  41. name: "name",
  42. shortname: "shortname",
  43. logourl: "logourl",
  44. level: "level",
  45. address: "address",
  46. number: "number",
  47. hascar: "hascar",
  48. },
  49. },
  50. service: "query",
  51. options: {
  52. query: ["skip", "limit"],
  53. sort: ["meta.createdAt"],
  54. desc: true,
  55. count: true,
  56. },
  57. },
  58. };