Browse Source

增加默认值

liuyu 5 years ago
parent
commit
25193736f3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/model/trainplan.js

+ 1 - 1
app/model/trainplan.js

@@ -40,7 +40,7 @@ const festivalInfo = new Schema({
 const TrainplanSchema = {
   year: { type: String, required: true, maxLength: 200 }, // 年份
   title: { type: String, required: true, maxLength: 500 }, // 标题
-  status: { type: String, required: false, maxLength: 200 }, // 状态,0-筹备中,1-发布,2-结束
+  status: { type: String, required: false, maxLength: 200, default: '0' }, // 状态,0-筹备中,1-发布,2-结束
   termnum: { type: [ termInfo ], select: true }, // 期
   festivals: { type: [ festivalInfo ], select: true }, // 节假日
 };