guhongwei 2 năm trước cách đây
mục cha
commit
89d883a7a7
1 tập tin đã thay đổi với 73 bổ sung65 xóa
  1. 73 65
      app/controller/.schedule.js

+ 73 - 65
app/controller/.schedule.js

@@ -1,89 +1,89 @@
 module.exports = {
   create: {
     requestBody: [
-      'match_id',
-      'match_name',
-      'red_id',
-      'red_name',
-      'red_logo',
-      'red_members',
-      'red_branch',
-      'red_integral',
-      'red_position',
-      'blue_id',
-      'blue_name',
-      'blue_logo',
-      'blue_members',
-      'blue_branch',
-      'blue_integral',
-      'blue_position',
-      'match_time',
-      'match_file',
-      'status',
-      'remark',
-      'is_bye',
-      'format',
+      "match_id",
+      "match_name",
+      "red_id",
+      "red_name",
+      "red_logo",
+      "red_members",
+      "red_branch",
+      "red_integral",
+      "red_position",
+      "blue_id",
+      "blue_name",
+      "blue_logo",
+      "blue_members",
+      "blue_branch",
+      "blue_integral",
+      "blue_position",
+      "match_time",
+      "match_file",
+      "status",
+      "remark",
+      "is_bye",
+      "format",
     ],
   },
   destroy: {
-    params: ['!id'],
-    service: 'delete',
+    params: ["!id"],
+    service: "delete",
   },
   update: {
-    params: ['!id'],
+    params: ["!id"],
     requestBody: [
-      'match_id',
-      'match_name',
-      'red_id',
-      'red_name',
-      'red_logo',
-      'red_members',
-      'red_branch',
-      'red_integral',
-      'red_position',
-      'blue_id',
-      'blue_name',
-      'blue_logo',
-      'blue_members',
-      'blue_branch',
-      'blue_integral',
-      'blue_position',
-      'match_time',
-      'match_file',
-      'status',
-      'remark',
-      'is_bye',
-      'format',
+      "match_id",
+      "match_name",
+      "red_id",
+      "red_name",
+      "red_logo",
+      "red_members",
+      "red_branch",
+      "red_integral",
+      "red_position",
+      "blue_id",
+      "blue_name",
+      "blue_logo",
+      "blue_members",
+      "blue_branch",
+      "blue_integral",
+      "blue_position",
+      "match_time",
+      "match_file",
+      "status",
+      "remark",
+      "is_bye",
+      "format",
     ],
   },
   show: {
     parameters: {
-      params: ['!id'],
+      params: ["!id"],
     },
-    service: 'fetch',
+    service: "fetch",
   },
   index: {
     parameters: {
       query: {
-        match_id: 'match_id',
-        match_name: 'match_name',
-        red_id: 'red_id',
-        red_name: 'red_name',
-        blue_id: 'blue_id',
-        blue_name: 'blue_name',
-        match_time: 'match_time',
-        status: 'status',
-        'meta.createdAt@start': 'meta.createdAt@start',
-        'meta.createdAt@end': 'meta.createdAt@end',
+        match_id: "match_id",
+        match_name: "match_name",
+        red_id: "red_id",
+        red_name: "red_name",
+        blue_id: "blue_id",
+        blue_name: "blue_name",
+        match_time: "match_time",
+        status: "status",
+        "meta.createdAt@start": "meta.createdAt@start",
+        "meta.createdAt@end": "meta.createdAt@end",
       },
       // options: {
       //   "meta.state": 0 // 默认条件
       // },
     },
-    service: 'query',
+    service: "query",
     options: {
-      query: ['skip', 'limit'],
-      sort: ['meta.createdAt'],
+      query: ["skip", "limit"],
+      sort: ["meta.createdAt"],
       desc: true,
       count: true,
     },
@@ -91,12 +91,20 @@ module.exports = {
   getByTeamCreater: {
     parameters: {
       query: {
-        user_id: 'user_id',
-        status: 'status',
+        user_id: "user_id",
+        status: "status",
+        match_id: "match_id",
+        match_name: "match_name",
+        red_id: "red_id",
+        red_name: "red_name",
+        blue_id: "blue_id",
+        blue_name: "blue_name",
+        match_time: "match_time",
+        status: "status",
       },
     },
     options: {
-      query: ['skip', 'limit'],
+      query: ["skip", "limit"],
     },
   },
 };