.schedule.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. "match_id",
  5. "match_name",
  6. "red_id",
  7. "red_name",
  8. "red_logo",
  9. "red_members",
  10. "red_branch",
  11. "red_integral",
  12. "red_position",
  13. "blue_id",
  14. "blue_name",
  15. "blue_logo",
  16. "blue_members",
  17. "blue_branch",
  18. "blue_integral",
  19. "blue_position",
  20. "match_time",
  21. "match_file",
  22. "status",
  23. "position",
  24. "remark",
  25. "is_bye",
  26. "format",
  27. ],
  28. },
  29. destroy: {
  30. params: ["!id"],
  31. service: "delete",
  32. },
  33. update: {
  34. params: ["!id"],
  35. requestBody: [
  36. "match_id",
  37. "match_name",
  38. "red_id",
  39. "red_name",
  40. "red_logo",
  41. "red_members",
  42. "red_branch",
  43. "red_integral",
  44. "red_position",
  45. "blue_id",
  46. "blue_name",
  47. "blue_logo",
  48. "blue_members",
  49. "blue_branch",
  50. "blue_integral",
  51. "blue_position",
  52. "match_time",
  53. "match_file",
  54. "status",
  55. "position",
  56. "remark",
  57. "is_bye",
  58. "format",
  59. ],
  60. },
  61. show: {
  62. parameters: {
  63. params: ["!id"],
  64. },
  65. service: "fetch",
  66. },
  67. index: {
  68. parameters: {
  69. query: {
  70. match_id: "match_id",
  71. match_name: "match_name",
  72. red_id: "red_id",
  73. red_name: "red_name",
  74. blue_id: "blue_id",
  75. blue_name: "blue_name",
  76. match_time: "match_time",
  77. status: "status",
  78. position:"position",
  79. "meta.createdAt@start": "meta.createdAt@start",
  80. "meta.createdAt@end": "meta.createdAt@end",
  81. },
  82. // options: {
  83. // "meta.state": 0 // 默认条件
  84. // },
  85. },
  86. service: "query",
  87. options: {
  88. query: ["skip", "limit"],
  89. sort: ["meta.createdAt"],
  90. desc: true,
  91. count: true,
  92. },
  93. },
  94. getByTeamCreater: {
  95. parameters: {
  96. query: {
  97. user_id: "user_id",
  98. status: "status",
  99. match_id: "match_id",
  100. match_name: "match_name",
  101. red_id: "red_id",
  102. red_name: "red_name",
  103. blue_id: "blue_id",
  104. blue_name: "blue_name",
  105. match_time: "match_time",
  106. status: "status",
  107. },
  108. },
  109. options: {
  110. query: ["skip", "limit"],
  111. },
  112. },
  113. };