.experts.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. '!name',
  5. 'imgpath',
  6. 'gender',
  7. 'nation',
  8. 'birth',
  9. 'cardtype',
  10. 'cardnumber',
  11. 'technical',
  12. 'technical_actual',
  13. 'position',
  14. 'school',
  15. 'eduback',
  16. 'degree',
  17. 'major_studied',
  18. 'professional',
  19. 'email',
  20. 'tel',
  21. 'phone',
  22. 'job_profile',
  23. 'project_profile',
  24. 'achievement',
  25. 'paper',
  26. 'remark',
  27. 'field',
  28. 'field_py',
  29. 'is_del'
  30. ]
  31. },
  32. destroy: {
  33. params: ['!id'],
  34. service: 'delete'
  35. },
  36. update: {
  37. params: ['!id'],
  38. requestBody: [
  39. 'name',
  40. 'imgpath',
  41. 'gender',
  42. 'nation',
  43. 'birth',
  44. 'cardtype',
  45. 'cardnumber',
  46. 'technical',
  47. 'technical_actual',
  48. 'position',
  49. 'school',
  50. 'eduback',
  51. 'degree',
  52. 'major_studied',
  53. 'professional',
  54. 'email',
  55. 'tel',
  56. 'phone',
  57. 'job_profile',
  58. 'project_profile',
  59. 'achievement',
  60. 'paper',
  61. 'remark',
  62. 'field',
  63. 'field_py',
  64. 'is_del'
  65. ]
  66. },
  67. show: {
  68. parameters: {
  69. params: ['!id']
  70. },
  71. service: 'fetch'
  72. },
  73. index: {
  74. parameters: {
  75. query: {
  76. name : 'name',
  77. imgpath : 'imgpath',
  78. gender : 'gender',
  79. nation : 'nation',
  80. birth : 'birth',
  81. cardtype : 'cardtype',
  82. cardnumber : 'cardnumber',
  83. technical : 'technical',
  84. technical_actual : 'technical_actual',
  85. position : 'position',
  86. school : 'school',
  87. eduback : 'eduback',
  88. degree : 'degree',
  89. major_studied : 'major_studied',
  90. professional : 'professional',
  91. email : 'email',
  92. tel : 'tel',
  93. phone : 'phone',
  94. job_profile : 'job_profile',
  95. project_profile: 'project_profile',
  96. achievement : 'achievement',
  97. paper : 'paper',
  98. remark : 'remark',
  99. field : 'field',
  100. field_py : 'field_py',
  101. is_del : 'is_del'
  102. }
  103. },
  104. service: 'query',
  105. options: {
  106. query: ['skip', 'limit'],
  107. sort: ['meta.createdAt'],
  108. desc: true,
  109. count: true
  110. }
  111. },
  112. };