|
@@ -2,20 +2,18 @@
|
|
|
const Schema = require('mongoose').Schema;
|
|
|
const metaPlugin = require('naf-framework-mongoose-free/lib/model/meta-plugin');
|
|
|
|
|
|
-
|
|
|
// 学校
|
|
|
const school = {
|
|
|
- yyzz: { type: Array, required: false, zh: '营业执照' }, //
|
|
|
name: { type: String, required: false, zh: '名称' }, //
|
|
|
brief: { type: String, required: false, zh: '简介' }, //
|
|
|
- img_url: { type: Array, required: false, zh: '图片' }, //
|
|
|
- address: { type: String, required: false, zh: '训练地址' }, //
|
|
|
phone: { type: String, required: false, zh: '联系方式' }, //
|
|
|
+ address: { type: String, required: false, zh: '训练地址' }, //
|
|
|
coach_num: { type: Number, required: false, default: '0', zh: '教练人数' }, //
|
|
|
student_num: { type: Number, required: false, default: '0', zh: '学员人数' }, //
|
|
|
- past_student: { type: String, required: false, zh: '历届学员' }, //
|
|
|
honor: { type: String, required: false, zh: '过往荣誉' }, //
|
|
|
url: { type: String, required: false, zh: '网址' }, //
|
|
|
+ yyzz: { type: Array, required: false, zh: '营业执照' }, //
|
|
|
+ img_url: { type: Array, required: false, zh: '图片' }, //
|
|
|
user_id: { type: String, required: false, zh: '用户表信息', ref: 'User', getProp: [ 'name' ] }, //
|
|
|
};
|
|
|
const schema = new Schema(school, { toJSON: { virtuals: true } });
|