.class.js 1.4 KB

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