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