liuyu 5 lat temu
rodzic
commit
a4712c0ae9
2 zmienionych plików z 6 dodań i 2 usunięć
  1. 4 2
      app/controller/.room.js
  2. 2 0
      app/model/room.js

+ 4 - 2
app/controller/.room.js

@@ -1,6 +1,6 @@
 module.exports = {
 module.exports = {
   create: {
   create: {
-    requestBody: ["title","name", "type", "filedir", "url", "anchorid","username","status","content"],
+    requestBody: ["title","name", "type", "filedir", "url", "anchorid","username","status","content","starttime","endtime"],
   },
   },
   destroy: {
   destroy: {
     params: ["!id"],
     params: ["!id"],
@@ -8,7 +8,7 @@ module.exports = {
   },
   },
   update: {
   update: {
     params: ["!id"],
     params: ["!id"],
-    requestBody: ["title","name", "type", "filedir", "url", "anchorid","username","status","content"],
+    requestBody: ["title","name", "type", "filedir", "url", "anchorid","username","status","content","starttime","endtime"],
   },
   },
   show: {
   show: {
     parameters: {
     parameters: {
@@ -26,6 +26,8 @@ module.exports = {
         url: "url",
         url: "url",
         status: "status",
         status: "status",
         anchorid: "anchorid",
         anchorid: "anchorid",
+        starttime: "starttime",
+        endtime: "endtime"
       },
       },
     },
     },
     service: "query",
     service: "query",

+ 2 - 0
app/model/room.js

@@ -11,6 +11,8 @@ const RoomSchema = {
   content: { type: String, required: false }, // 直播简介
   content: { type: String, required: false }, // 直播简介
   anchorid: { type: String, required: false, maxLength: 200 }, // 主播id
   anchorid: { type: String, required: false, maxLength: 200 }, // 主播id
   username: { type: String, required: false, maxLength: 200 }, // 主播名称
   username: { type: String, required: false, maxLength: 200 }, // 主播名称
+  starttime: { type: String, required: false }, // 开始时间
+  endtime: { type: String, required: false }, // 结束时间
   status: { type: String, required: false, maxLength: 64, default: '0' }, // 状态0、开启1、关闭
   status: { type: String, required: false, maxLength: 64, default: '0' }, // 状态0、开启1、关闭
 };
 };