.leave.js 1.2 KB

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