Kaynağa Gözat

分组表新增字段

reloaded 5 yıl önce
ebeveyn
işleme
beba559d78
2 değiştirilmiş dosya ile 7 ekleme ve 3 silme
  1. 6 3
      app/controller/.group.js
  2. 1 0
      app/model/group.js

+ 6 - 3
app/controller/.group.js

@@ -6,7 +6,8 @@ module.exports = {
       'batchid',
       'classid',
       'students',
-      'score'
+      'score',
+      'status'
     ]
   },
   destroy: {
@@ -21,7 +22,8 @@ module.exports = {
       'batchid',
       'classid',
       'students',
-      'score'
+      'score',
+      'status'
     ]
   },
   show: {
@@ -38,7 +40,8 @@ module.exports = {
         batchid:'batchid',
         classid :'classid',
         students :'students',
-        score :'score'
+        score: 'score', 
+        status :'status'
       }
     },
     service: 'query',

+ 1 - 0
app/model/group.js

@@ -16,6 +16,7 @@ const GroupSchema = {
   classid: { type: String, required: false, maxLength: 500 }, // 班级id
   students: { type: [ stuInfo ], select: true }, // 学生信息
   score: { type: String, required: false, maxLength: 500 }, // 分数
+  status: { type: String, required: true, maxLength: 500, default: '0' }, // 状态,0-未确认,1-确认
 };