.headteacher.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. "!name",
  5. "gender",
  6. "nation",
  7. "!mobile",
  8. "phone",
  9. "idnumber",
  10. "politics",
  11. "jobaddress",
  12. "department",
  13. "job",
  14. "protitle",
  15. "education",
  16. "degree",
  17. "qq",
  18. "openid",
  19. "eduexperience",
  20. "islyteacher",
  21. ],
  22. },
  23. destroy: {
  24. params: ["!id"],
  25. service: "delete",
  26. },
  27. update: {
  28. params: ["!id"],
  29. requestBody: [
  30. "!name",
  31. "gender",
  32. "nation",
  33. "!mobile",
  34. "phone",
  35. "idnumber",
  36. "politics",
  37. "jobaddress",
  38. "department",
  39. "job",
  40. "protitle",
  41. "education",
  42. "degree",
  43. "qq",
  44. "openid",
  45. "eduexperience",
  46. "islyteacher",
  47. 'status'
  48. ],
  49. },
  50. show: {
  51. parameters: {
  52. params: ["!id"],
  53. },
  54. service: "fetch",
  55. },
  56. index: {
  57. parameters: {
  58. query: {
  59. name: "name",
  60. mobile: "mobile",
  61. gender: "gender",
  62. openid: "openid",
  63. department: "department",
  64. islyteacher: "islyteacher",
  65. },
  66. },
  67. service: "query",
  68. options: {
  69. query: ["skip", "limit"],
  70. sort: ["meta.createdAt"],
  71. desc: true,
  72. count: true,
  73. },
  74. },
  75. };