.leave.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. "batchid",
  5. "termid",
  6. "planid",
  7. "!studentid",
  8. "classid",
  9. "starttime",
  10. "endtime",
  11. "reason",
  12. "status",
  13. "refcause",
  14. "type",
  15. ],
  16. },
  17. destroy: {
  18. params: ["!id"],
  19. service: "delete",
  20. },
  21. update: {
  22. params: ["!id"],
  23. requestBody: [
  24. "batchid",
  25. "termid",
  26. "planid",
  27. "classid",
  28. "studentid",
  29. "starttime",
  30. "endtime",
  31. "reason",
  32. "status",
  33. "refcause",
  34. "type",
  35. ],
  36. },
  37. show: {
  38. parameters: {
  39. params: ["!id"],
  40. },
  41. service: "fetch",
  42. },
  43. index: {
  44. parameters: {
  45. query: {
  46. batchid: "batchid",
  47. termid: "termid",
  48. planid: "planid",
  49. studentid: "studentid",
  50. classid: "classid",
  51. starttime: "starttime",
  52. endtime: "endtime",
  53. reason: "reason",
  54. status: "status",
  55. refcause: "refcause",
  56. type: "type",
  57. },
  58. },
  59. service: "query",
  60. options: {
  61. query: ["skip", "limit"],
  62. sort: ["meta.createdAt"],
  63. desc: true,
  64. count: true,
  65. },
  66. },
  67. };