.user.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. "!name",
  5. "!password",
  6. "cardnumber",
  7. "phone",
  8. "email",
  9. "addr",
  10. "img_path",
  11. "is_qy",
  12. "cardfile_a",
  13. "cardfile_b",
  14. "img_qy",
  15. "resume",
  16. "major",
  17. "institution_type",
  18. "institution_name",
  19. "institution_code",
  20. "institution_nature",
  21. "office_phone",
  22. "profession",
  23. "status",
  24. "is_del",
  25. "role",
  26. "token",
  27. 'deptname',
  28. 'pid',
  29. 'code',
  30. "columnid",
  31. "openid"
  32. ],
  33. },
  34. destroy: {
  35. params: ["!id"],
  36. service: "delete",
  37. },
  38. update: {
  39. params: ["!id"],
  40. requestBody: [
  41. "name",
  42. "password",
  43. "cardnumber",
  44. "phone",
  45. "email",
  46. "addr",
  47. "img_path",
  48. "is_qy",
  49. "cardfile_a",
  50. "cardfile_b",
  51. "img_qy",
  52. "resume",
  53. "major",
  54. "institution_type",
  55. "institution_name",
  56. "institution_code",
  57. "institution_nature",
  58. "office_phone",
  59. "profession",
  60. "status",
  61. "is_del",
  62. "role",
  63. "token",
  64. 'deptname',
  65. 'pid',
  66. 'code',
  67. "columnid",
  68. "openid"
  69. ],
  70. },
  71. show: {
  72. parameters: {
  73. params: ["!id"],
  74. },
  75. service: "fetch",
  76. },
  77. index: {
  78. parameters: {
  79. query: {
  80. name: "name",
  81. password: "password",
  82. cardnumber: "cardnumber",
  83. phone: "phone",
  84. email: "email",
  85. addr: "addr",
  86. img_path: "img_path",
  87. is_qy: "is_qy",
  88. cardfile_a: "cardfile_a",
  89. cardfile_b: "cardfile_b",
  90. img_qy: "img_qy",
  91. resume: "resume",
  92. major: "major",
  93. institution_type: "institution_type",
  94. institution_name: "institution_name",
  95. institution_code: "institution_code",
  96. institution_nature: "institution_nature",
  97. office_phone: "office_phone",
  98. profession: "profession",
  99. status: "status",
  100. is_del: "is_del",
  101. role: "role",
  102. token: "token",
  103. deptname: 'deptname',
  104. pid: 'pid',
  105. code: 'code',
  106. columnidg :"columnid",
  107. openid:"openid"
  108. },
  109. },
  110. service: "query",
  111. options: {
  112. query: ["skip", "limit"],
  113. sort: ["meta.createdAt"],
  114. desc: true,
  115. count: true,
  116. },
  117. },
  118. login: {
  119. requestBody: ["phone", "password", "role"],
  120. service: "login",
  121. },
  122. };