lrf402788946 4 年之前
父节点
当前提交
cc72a64d6a
共有 3 个文件被更改,包括 4 次插入3 次删除
  1. 2 2
      app/controller/.answerapply.js
  2. 1 0
      app/model/answerapply.js
  3. 1 1
      app/model/chatroom.js

+ 2 - 2
app/controller/.answerapply.js

@@ -1,6 +1,6 @@
 module.exports = {
   create: {
-    requestBody: ["!teacherid", "!date", "!subid"],
+    requestBody: ["!teacherid","teacher", "!date", "!subid"],
   },
   destroy: {
     params: ["!id"],
@@ -8,7 +8,7 @@ module.exports = {
   },
   update: {
     params: ["!id"],
-    requestBody: ["!teacherid", "!date", "!subid", "status"],
+    requestBody: ["!teacherid","teacher", "!date", "!subid", "status"],
   },
   show: {
     parameters: {

+ 1 - 0
app/model/answerapply.js

@@ -3,6 +3,7 @@ const Schema = require('mongoose').Schema;
 const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
 
 const Answerapply = {
+  teacher: { type: String, required: true, maxLength: 200 }, // 教师
   teacherid: { type: String, required: true, maxLength: 200 }, // 教师id
   date: { type: [ String ], required: true }, // 申请答疑的时间列表
   subid: { type: String, required: true, maxLength: 200 }, // 科目id

+ 1 - 1
app/model/chatroom.js

@@ -2,7 +2,7 @@
 const Schema = require('mongoose').Schema;
 const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
 
-// 教师直播房间
+// 教师-学生答疑房间
 const ChatroommSchema = {
   number: { type: String, required: false, maxLength: 200, default: new Date().getTime() }, // 房间号
   teacherid: { type: String, required: true, maxLength: 200 }, // 教师id