.school.js 1010 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. findByCodes:{
  59. requestBody: [
  60. "code",
  61. ],
  62. }
  63. };