lrf402788946 4 年 前
コミット
1c63493a81
2 ファイル変更5 行追加1 行削除
  1. 3 0
      app/controller/.trainvideo.js
  2. 2 1
      app/model/trainvideo.js

+ 3 - 0
app/controller/.trainvideo.js

@@ -5,6 +5,7 @@ module.exports = {
       "!subid",
       "!teacher",
       "!teacherid",
+      "subname",
       "touser",
       "status",
     ],
@@ -22,6 +23,7 @@ module.exports = {
       "!teacherid",
       "touser",
       "status",
+      "subname",
     ],
   },
   show: {
@@ -37,6 +39,7 @@ module.exports = {
         teacher: "teacher",
         teacherid: "teacherid",
         touser: "touser",
+        subname:'subname',
         status: "status",
       },
     },

+ 2 - 1
app/model/trainvideo.js

@@ -6,9 +6,10 @@ const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
 const TrainVideoSchema = {
   url: { type: String, required: true, maxLength: 200 }, // 视频地址
   subid: { type: String, required: true, maxLength: 200 }, // 科目id
+  subname: { type: String, required: true, maxLength: 200 }, // 科目名称
   teacher: { type: String, required: true, maxLength: 200 }, // 教师姓名
   teacherid: { type: String, required: true, maxLength: 200 }, // 教师id
-  status: { type: String, required: false, maxLength: 200, default: '0' }, // 状态:0=>未审核;1=>审核通过(中心直接传来,通过);2=>审核失败
+  status: { type: String, required: false, maxLength: 200, default: "0" }, // 状态:0=>未审核;1=>审核通过(中心直接传来,通过);2=>审核失败
   touser: { type: String, required: false, maxLength: 20 }, // 面向对象:0=>所有人;1=>教师;2=>学生;3=>班主任
 };