.student.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. '!name',
  5. '!id_number',
  6. '!phone',
  7. 'gender',
  8. 'nation',
  9. 'school_name',
  10. 'major',
  11. 'entry_year',
  12. 'finish_year',
  13. 'school_job',
  14. 'qq',
  15. 'email',
  16. 'openid',
  17. 'family_place',
  18. 'family_is_hard',
  19. 'have_grant',
  20. 'job',
  21. 'termid',
  22. 'batchid',
  23. 'classid',
  24. 'bedroomid',
  25. 'is_fine'
  26. ]
  27. },
  28. destroy: {
  29. params: ['!id'],
  30. service: 'delete'
  31. },
  32. update: {
  33. params: ['!id'],
  34. requestBody: [
  35. 'name',
  36. 'id_number',
  37. 'phone',
  38. 'gender',
  39. 'nation',
  40. 'school_name',
  41. 'major',
  42. 'entry_year',
  43. 'finish_year',
  44. 'school_job',
  45. 'qq',
  46. 'email',
  47. 'openid',
  48. 'family_place',
  49. 'family_is_hard',
  50. 'have_grant',
  51. 'job',
  52. 'termid',
  53. 'batchid',
  54. 'classid',
  55. 'bedroomid',
  56. 'is_fine'
  57. ]
  58. },
  59. show: {
  60. parameters: {
  61. params: ['!id']
  62. },
  63. service: 'fetch'
  64. },
  65. index: {
  66. parameters: {
  67. query: {
  68. name:'name',
  69. id_number: 'id_number',
  70. phone:'phone',
  71. gender:'gender',
  72. nation:'nation',
  73. school_name:'school_name',
  74. major:'major',
  75. entry_year:'entry_year',
  76. finish_year:'finish_year',
  77. school_job :'school_job',
  78. qq :'qq',
  79. email:'email',
  80. openid:'openid',
  81. family_place :'family_place',
  82. family_is_hard:'family_is_hard',
  83. have_grant :'have_grant',
  84. job:'job',
  85. termid:'termid',
  86. batchid:'batchid',
  87. classid:'classid',
  88. bedroomid : 'bedroomid',
  89. is_fine:'is_fine'
  90. }
  91. },
  92. service: 'query',
  93. options: {
  94. query: ['skip', 'limit'],
  95. sort: ['meta.createdAt'],
  96. desc: true,
  97. count: true
  98. }
  99. },
  100. };