.class.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. 'lessonid',
  14. 'type'
  15. ]
  16. },
  17. destroy: {
  18. params: ['!id'],
  19. service: 'delete'
  20. },
  21. update: {
  22. params: ['!id'],
  23. requestBody: [
  24. 'name',
  25. 'number',
  26. 'batchid',
  27. 'termid',
  28. 'headteacherid',
  29. 'lyteacherid',
  30. 'yclocationid',
  31. 'kzjhlocationid',
  32. 'kbyslocationid',
  33. 'lessonid',
  34. 'type'
  35. ]
  36. },
  37. show: {
  38. parameters: {
  39. params: ['!id']
  40. },
  41. service: 'fetch'
  42. },
  43. index: {
  44. parameters: {
  45. query: {
  46. name: 'name',
  47. number :'number',
  48. batchid:'batchid',
  49. termid: 'termid',
  50. headteacherid : 'headteacherid',
  51. lyteacherid : 'lyteacherid',
  52. yclocationid:'yclocationid',
  53. kzjhlocationid :'kzjhlocationid',
  54. kbyslocationid :'kbyslocationid',
  55. lessonid :'lessonid',
  56. type: 'type'
  57. }
  58. },
  59. service: 'query',
  60. options: {
  61. query: ['skip', 'limit'],
  62. sort: ['meta.createdAt'],
  63. desc: true,
  64. count: true
  65. }
  66. },
  67. };