lrf 2 年 前
コミット
4ea22e2155

+ 2 - 2
app/controller/relation/config/.relationCoachSchool.js

@@ -1,6 +1,6 @@
 module.exports = {
 module.exports = {
   create: {
   create: {
-    requestBody: ['!coach_id', '!school_id', 'doc', 'salary'],
+    requestBody: ['!coach_id', '!school_id', 'doc', 'money'],
   },
   },
   destroy: {
   destroy: {
     params: ['!id'],
     params: ['!id'],
@@ -8,7 +8,7 @@ module.exports = {
   },
   },
   update: {
   update: {
     params: ['!id'],
     params: ['!id'],
-    requestBody: ['coach_id', 'school_id', 'doc', 'salary'],
+    requestBody: ['coach_id', 'school_id', 'doc', 'money'],
   },
   },
   show: {
   show: {
     parameters: {
     parameters: {

+ 2 - 2
app/controller/relation/config/.relationStudentSchool.js

@@ -1,6 +1,6 @@
 module.exports = {
 module.exports = {
   create: {
   create: {
-    requestBody: ['student_id', 'school_id', 'doc'],
+    requestBody: ['student_id', 'school_id', 'doc', 'money'],
   },
   },
   destroy: {
   destroy: {
     params: ['!id'],
     params: ['!id'],
@@ -8,7 +8,7 @@ module.exports = {
   },
   },
   update: {
   update: {
     params: ['!id'],
     params: ['!id'],
-    requestBody: ['student_id', 'school_id', 'doc'],
+    requestBody: ['student_id', 'school_id', 'doc', 'money'],
   },
   },
   show: {
   show: {
     parameters: {
     parameters: {

+ 3 - 3
app/model/relation/relationCoachSchool.js

@@ -4,10 +4,10 @@ const metaPlugin = require('naf-framework-mongoose-free/lib/model/meta-plugin');
 
 
 // 教练与学校的关系表
 // 教练与学校的关系表
 const relationCoachSchool = {
 const relationCoachSchool = {
-  coach_id: { type: String, required: true, zh: '教练id', ref: 'Coach', getProp: [ 'name', 'phone', 'level', 'icon' ] }, //
-  school_id: { type: String, required: true, zh: '学校id', ref: 'School', getProp: [ 'name', 'phone' ] }, //
+  coach_id: { type: String, required: true, zh: '教练id', ref: 'Coach', getProp: ['name', 'phone', 'level', 'icon'] }, //
+  school_id: { type: String, required: true, zh: '学校id', ref: 'School', getProp: ['name', 'phone'] }, //
   doc: { type: Object, required: false, zh: '教练档案' }, //
   doc: { type: Object, required: false, zh: '教练档案' }, //
-  salary: { type: Number, zh: '工资' },
+  money: { type: Number, zh: '工资' },
 };
 };
 const schema = new Schema(relationCoachSchool, { toJSON: { virtuals: true } });
 const schema = new Schema(relationCoachSchool, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
 schema.index({ id: 1 });

+ 1 - 0
app/model/relation/relationStudentSchool.js

@@ -12,6 +12,7 @@ const relationStudentSchool = {
   student_id: { type: String, required: false, zh: '学员id', ref: 'Student', getProp: [ 'name', 'icon', 'level', 'phone' ] }, //
   student_id: { type: String, required: false, zh: '学员id', ref: 'Student', getProp: [ 'name', 'icon', 'level', 'phone' ] }, //
   school_id: { type: String, required: false, zh: '学校id', ref: 'School', getProp: [ 'img_url', 'name', 'phone', 'coach_num', 'student_num', 'address', 'brief' ] }, //
   school_id: { type: String, required: false, zh: '学校id', ref: 'School', getProp: [ 'img_url', 'name', 'phone', 'coach_num', 'student_num', 'address', 'brief' ] }, //
   doc: { type: Object, required: false, zh: '档案' }, //
   doc: { type: Object, required: false, zh: '档案' }, //
+  money: { type: Number, zh: '余额' },
 };
 };
 const schema = new Schema(relationStudentSchool, { toJSON: { virtuals: true } });
 const schema = new Schema(relationStudentSchool, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
 schema.index({ id: 1 });