Przeglądaj źródła

增加期批次计划id

liuyu 5 lat temu
rodzic
commit
586fc162a3
2 zmienionych plików z 12 dodań i 0 usunięć
  1. 9 0
      app/controller/.leave.js
  2. 3 0
      app/model/leave.js

+ 9 - 0
app/controller/.leave.js

@@ -1,6 +1,9 @@
 module.exports = {
   create: {
     requestBody: [
+      'batchid',
+      'termid',
+      'planid',
       '!studentid',
       'starttime',
       'endtime',
@@ -17,6 +20,9 @@ module.exports = {
   update: {
     params: ['!id'],
     requestBody: [
+      'batchid',
+      'termid',
+      'planid',
       'studentid',
       'starttime',
       'endtime',
@@ -35,6 +41,9 @@ module.exports = {
   index: {
     parameters: {
       query: {
+        batchid:'batchid',
+        termid: 'termid',
+        planid: 'planid',
         studentid :'studentid',
         starttime :'starttime',
         endtime :'endtime',

+ 3 - 0
app/model/leave.js

@@ -4,6 +4,9 @@ const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
 
 // 请假表
 const LeaveSchema = {
+  batchid: { type: String, required: false, maxLength: 200 }, // 批次
+  termid: { type: String, required: false, maxLength: 200 }, // 期
+  planid: { type: String, required: false, maxLength: 200 }, // 计划
   studentid: { type: String, required: true, maxLength: 200 }, // 学生id
   starttime: { type: String, required: false, maxLength: 200 }, // 开始时间
   endtime: { type: String, required: false, maxLength: 500 }, // 结束时间