.schedule.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. "remark",
  24. "is_bye",
  25. "format",
  26. ],
  27. },
  28. destroy: {
  29. params: ["!id"],
  30. service: "delete",
  31. },
  32. update: {
  33. params: ["!id"],
  34. requestBody: [
  35. "match_id",
  36. "match_name",
  37. "red_id",
  38. "red_name",
  39. "red_logo",
  40. "red_members",
  41. "red_branch",
  42. "red_integral",
  43. "red_position",
  44. "blue_id",
  45. "blue_name",
  46. "blue_logo",
  47. "blue_members",
  48. "blue_branch",
  49. "blue_integral",
  50. "blue_position",
  51. "match_time",
  52. "match_file",
  53. "status",
  54. "remark",
  55. "is_bye",
  56. "format",
  57. ],
  58. },
  59. show: {
  60. parameters: {
  61. params: ["!id"],
  62. },
  63. service: "fetch",
  64. },
  65. index: {
  66. parameters: {
  67. query: {
  68. match_id: "match_id",
  69. match_name: "match_name",
  70. red_id: "red_id",
  71. red_name: "red_name",
  72. blue_id: "blue_id",
  73. blue_name: "blue_name",
  74. match_time: "match_time",
  75. status: "status",
  76. "meta.createdAt@start": "meta.createdAt@start",
  77. "meta.createdAt@end": "meta.createdAt@end",
  78. },
  79. // options: {
  80. // "meta.state": 0 // 默认条件
  81. // },
  82. },
  83. service: "query",
  84. options: {
  85. query: ["skip", "limit"],
  86. sort: ["meta.createdAt"],
  87. desc: true,
  88. count: true,
  89. },
  90. },
  91. getByTeamCreater: {
  92. parameters: {
  93. query: {
  94. user_id: "user_id",
  95. status: "status",
  96. match_id: "match_id",
  97. match_name: "match_name",
  98. red_id: "red_id",
  99. red_name: "red_name",
  100. blue_id: "blue_id",
  101. blue_name: "blue_name",
  102. match_time: "match_time",
  103. status: "status",
  104. },
  105. },
  106. options: {
  107. query: ["skip", "limit"],
  108. },
  109. },
  110. };