.schedule.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. 'blue_id',
  13. 'blue_name',
  14. 'blue_logo',
  15. 'blue_members',
  16. 'blue_branch',
  17. 'blue_integral',
  18. 'match_time',
  19. 'match_file',
  20. 'status',
  21. 'remark',
  22. 'match_position',
  23. 'is_bye',
  24. 'format',
  25. ],
  26. },
  27. destroy: {
  28. params: ['!id'],
  29. service: 'delete',
  30. },
  31. update: {
  32. params: ['!id'],
  33. requestBody: [
  34. 'match_id',
  35. 'match_name',
  36. 'red_id',
  37. 'red_name',
  38. 'red_logo',
  39. 'red_members',
  40. 'red_branch',
  41. 'red_integral',
  42. 'blue_id',
  43. 'blue_name',
  44. 'blue_logo',
  45. 'blue_members',
  46. 'blue_branch',
  47. 'blue_integral',
  48. 'match_time',
  49. 'match_file',
  50. 'status',
  51. 'remark',
  52. 'match_position',
  53. 'is_bye',
  54. 'format',
  55. ],
  56. },
  57. show: {
  58. parameters: {
  59. params: ['!id'],
  60. },
  61. service: 'fetch',
  62. },
  63. index: {
  64. parameters: {
  65. query: {
  66. match_id: 'match_id',
  67. match_name: 'match_name',
  68. red_id: 'red_id',
  69. red_name: 'red_name',
  70. blue_id: 'blue_id',
  71. blue_name: 'blue_name',
  72. match_time: 'match_time',
  73. status: 'status',
  74. 'meta.createdAt@start': 'meta.createdAt@start',
  75. 'meta.createdAt@end': 'meta.createdAt@end',
  76. },
  77. // options: {
  78. // "meta.state": 0 // 默认条件
  79. // },
  80. },
  81. service: 'query',
  82. options: {
  83. query: ['skip', 'limit'],
  84. sort: ['meta.createdAt'],
  85. desc: true,
  86. count: true,
  87. },
  88. },
  89. };