.leave.js 1.1 KB

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