.class.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. '!name',
  5. 'number',
  6. 'batchid',
  7. 'termid',
  8. 'planid',
  9. 'headteacherid',
  10. 'lyteacherid',
  11. 'yclocationid',
  12. 'kzjhlocationid',
  13. 'kbyslocationid',
  14. 'jslocationid',
  15. 'lessonid',
  16. 'type'
  17. ]
  18. },
  19. destroy: {
  20. params: ['!id'],
  21. service: 'delete'
  22. },
  23. update: {
  24. params: ['!id'],
  25. requestBody: [
  26. 'name',
  27. 'number',
  28. 'batchid',
  29. 'termid',
  30. 'planid',
  31. 'headteacherid',
  32. 'lyteacherid',
  33. 'yclocationid',
  34. 'kzjhlocationid',
  35. 'kbyslocationid',
  36. 'jslocationid',
  37. 'lessonid',
  38. 'type'
  39. ]
  40. },
  41. show: {
  42. parameters: {
  43. params: ['!id']
  44. },
  45. service: 'fetch'
  46. },
  47. index: {
  48. parameters: {
  49. query: {
  50. name: 'name',
  51. number :'number',
  52. batchid:'batchid',
  53. termid: 'termid',
  54. planid: 'planid',
  55. headteacherid : 'headteacherid',
  56. lyteacherid : 'lyteacherid',
  57. yclocationid:'yclocationid',
  58. kzjhlocationid :'kzjhlocationid',
  59. kbyslocationid :'kbyslocationid',
  60. jslocationid: 'jslocationid',
  61. lessonid :'lessonid',
  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. };