Browse Source

Merge branch 'master' of http://git.cc-lotus.info/new_train/service-center

liuyu 5 years ago
parent
commit
4d63b0ba59
2 changed files with 22 additions and 2 deletions
  1. 20 2
      app/controller/.trainmodel.js
  2. 2 0
      app/model/trainmodel.js

+ 20 - 2
app/controller/.trainmodel.js

@@ -1,6 +1,14 @@
 module.exports = {
 module.exports = {
   create: {
   create: {
-    requestBody: ["total", "day", "color", "batchnum", "classnum"],
+    requestBody: [
+      "total",
+      "day",
+      "color",
+      "batchnum",
+      "classnum",
+      "stunum",
+      "carpnum",
+    ],
   },
   },
   destroy: {
   destroy: {
     params: ["!id"],
     params: ["!id"],
@@ -8,7 +16,15 @@ module.exports = {
   },
   },
   update: {
   update: {
     params: ["!id"],
     params: ["!id"],
-    requestBody: ["total", "day", "color", "batchnum", "classnum"],
+    requestBody: [
+      "total",
+      "day",
+      "color",
+      "batchnum",
+      "classnum",
+      "stunum",
+      "carpnum",
+    ],
   },
   },
   show: {
   show: {
     parameters: {
     parameters: {
@@ -24,6 +40,8 @@ module.exports = {
         color: "color",
         color: "color",
         batchnum: "batchnum",
         batchnum: "batchnum",
         classnum: "classnum",
         classnum: "classnum",
+        stunum: "stunum",
+        carpnum: "carpnum",
       },
       },
     },
     },
     service: "query",
     service: "query",

+ 2 - 0
app/model/trainmodel.js

@@ -9,6 +9,8 @@ const TrainmodelSchema = {
   color: { type: [ String ], required: false }, // 默认颜色
   color: { type: [ String ], required: false }, // 默认颜色
   batchnum: { type: String, required: false, maxLength: 200 }, // 默认期下生成的批次数
   batchnum: { type: String, required: false, maxLength: 200 }, // 默认期下生成的批次数
   classnum: { type: String, required: false, maxLength: 200 }, // 默认批次下生成的班级数
   classnum: { type: String, required: false, maxLength: 200 }, // 默认批次下生成的班级数
+  stunum: { type: String, required: false, maxLength: 200 }, // 默认每班学生数
+  carpnum: { type: String, required: false, maxLength: 200 }, // 默认每辆车的学生数
 };
 };