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

+ 17 - 2
app/controller/.trainvideo.js

@@ -1,6 +1,13 @@
 module.exports = {
   create: {
-    requestBody: ["!url", "!subid", "!teacher", "!teacherid", "touser"],
+    requestBody: [
+      "!url",
+      "!subid",
+      "!teacher",
+      "!teacherid",
+      "touser",
+      "status",
+    ],
   },
   destroy: {
     params: ["!id"],
@@ -8,7 +15,14 @@ module.exports = {
   },
   update: {
     params: ["!id"],
-    requestBody: ["!url", "!subid", "!teacher", "!teacherid", "touser"],
+    requestBody: [
+      "!url",
+      "!subid",
+      "!teacher",
+      "!teacherid",
+      "touser",
+      "status",
+    ],
   },
   show: {
     parameters: {
@@ -23,6 +37,7 @@ module.exports = {
         teacher: "teacher",
         teacherid: "teacherid",
         touser: "touser",
+        status: "status",
       },
     },
     service: "query",

+ 1 - 0
app/model/uploadtask.js

@@ -5,6 +5,7 @@ const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
 // 答案详情
 const answerInfo = new Schema({
   questionid: { type: String, required: false, maxLength: 200 }, // 问题id
+  topic: { type: String, required: false, maxLength: 200 }, // 问题
   answer: { type: String, required: false, maxLength: 200 }, // 答案
   questionscore: { type: String, required: false, maxLength: 200 }, // 分数
 });