|
@@ -26,6 +26,7 @@ const schedule = {
|
|
status: { type: String, default: '0' }, // 状态
|
|
status: { type: String, default: '0' }, // 状态
|
|
|
|
|
|
match_position: { type: String }, // 比赛流程图位置,可以用来计算晋级后的位置
|
|
match_position: { type: String }, // 比赛流程图位置,可以用来计算晋级后的位置
|
|
|
|
+ format: { type: Array }, //赛制
|
|
is_bye: { type: Boolean, default: false }, // 是否轮空, 轮空只有1个队伍
|
|
is_bye: { type: Boolean, default: false }, // 是否轮空, 轮空只有1个队伍
|
|
remark: { type: String },
|
|
remark: { type: String },
|
|
};
|
|
};
|
|
@@ -38,7 +39,7 @@ schema.index({ match_time: 1 });
|
|
schema.index({ status: 1 });
|
|
schema.index({ status: 1 });
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
schema.plugin(metaPlugin);
|
|
schema.plugin(metaPlugin);
|
|
-module.exports = app => {
|
|
|
|
|
|
+module.exports = (app) => {
|
|
const { mongoose } = app;
|
|
const { mongoose } = app;
|
|
return mongoose.model('Schedule', schema, 'schedule');
|
|
return mongoose.model('Schedule', schema, 'schedule');
|
|
};
|
|
};
|