reloaded %!s(int64=5) %!d(string=hai) anos
pai
achega
f0e42e9454
Modificáronse 3 ficheiros con 12 adicións e 0 borrados
  1. 3 0
      app/controller/.trainplan.js
  2. 8 0
      app/model/trainplan.js
  3. 1 0
      app/service/student.js

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

@@ -5,6 +5,7 @@ module.exports = {
       '!title',
       'status',
       'termnum',
+      'festivals'
     ]
   },
   destroy: {
@@ -18,6 +19,7 @@ module.exports = {
       'title',
       'status',
       'termnum',
+      'festivals'
     ]
   },
   show: {
@@ -33,6 +35,7 @@ module.exports = {
         title :'title',
         status :'status',
         termnum :'termnum',
+        festivals:'festivals'
       }
     },
     service: 'query',

+ 8 - 0
app/model/trainplan.js

@@ -28,6 +28,13 @@ const termInfo = new Schema({
   school: { type: [ schInfo ], select: true }, // 学校
 });
 
+// 节假日信息表
+const festivalInfo = new Schema({
+  begindate: { type: String, required: false, maxLength: 200 }, // 开始日期
+  finishdate: { type: String, required: false, maxLength: 200 }, // 结束日期
+  name: { type: String, required: false, maxLength: 200 }, // 名称
+});
+
 
 // 培训计划表
 const TrainplanSchema = {
@@ -35,6 +42,7 @@ const TrainplanSchema = {
   title: { type: String, required: true, maxLength: 500 }, // 标题
   status: { type: String, required: false, maxLength: 200 }, // 状态,0-筹备中,1-发布,2-结束
   termnum: { type: [ termInfo ], select: true }, // 期
+  festivals: { type: [ festivalInfo ], select: true }, // 节假日
 };
 
 

+ 1 - 0
app/service/student.js

@@ -12,6 +12,7 @@ class StudentService extends CrudService {
     super(ctx, 'student');
     this.model = this.ctx.model.Student;
   }
+
 }
 
 module.exports = StudentService;