|
@@ -6,12 +6,12 @@ const moneyPlugin = require('naf-framework-mongoose-free/lib/model/type-money-pl
|
|
|
// 课程表
|
|
|
const lesson = {
|
|
|
school_id: { type: String, required: false, zh: '学校id', ref: 'School', getProp: [ 'name' ] }, //
|
|
|
+ type: { type: String, required: false, zh: '课程类型', default: '0' }, // 0:公开课;1私教课
|
|
|
title: { type: String, required: false, zh: '课程标题' }, //
|
|
|
time_start: { type: String, required: false, zh: '开始上课时间' }, //
|
|
|
time_end: { type: String, required: false, zh: '结束时间' }, //
|
|
|
limit: { type: Number, zh: '人数上限' },
|
|
|
refund_hour: { type: String, zh: '退款期限' },
|
|
|
- type: { type: String, required: false, zh: '课程类型', default: '0' }, // 0:公开课;1私教课
|
|
|
status: { type: String, required: false, zh: '状态', default: '0' }, // 0-准备中;1-报名中;2-报名结束;3-已开课;4-已结课;-1-停课
|
|
|
brief: { type: String, required: false, zh: '简介' }, //
|
|
|
};
|
|
@@ -23,7 +23,7 @@ schema.index({ time_start: 1 });
|
|
|
schema.index({ time_end: 1 });
|
|
|
|
|
|
schema.plugin(metaPlugin);
|
|
|
-schema.plugin(moneyPlugin({ zh: '工资' }));
|
|
|
+schema.plugin(moneyPlugin({ zh: '课程费' }));
|
|
|
module.exports = app => {
|
|
|
const { mongoose } = app;
|
|
|
return mongoose.model('Lesson', schema, 'lesson');
|