.leave.js 1.3 KB

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