.class.js 1.3 KB

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