|
@@ -15,20 +15,21 @@ const bottom_menu = {
|
|
|
// 系统设置
|
|
|
const config = {
|
|
|
title: { type: String, required: false, zh: '系统名称' }, //
|
|
|
+ shop: { type: String, required: false, zh: '店铺id' }, //
|
|
|
config: { type: Object, required: false, zh: '设置' }, //
|
|
|
agree: { type: String, required: false, zh: '用户协议' }, // 富文本
|
|
|
bottom_title: { type: String, required: false, zh: '底部加载数据结束的文字提示' }, //
|
|
|
bottom_menu: { type: Object, zh: '底部菜单' },
|
|
|
reward_day: { type: Number, zh: '提现日期', default: 14 },
|
|
|
- leader: { type: Object, required: false , zh: '团长规则' }, // explain,rule
|
|
|
+ leader: { type: Object, required: false, zh: '团长规则' }, // explain,rule
|
|
|
};
|
|
|
const schema = new Schema(config, { toJSON: { getters: true, virtuals: true } });
|
|
|
schema.index({ id: 1 });
|
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
|
-
|
|
|
+schema.index({ shop: 1 });
|
|
|
schema.plugin(metaPlugin);
|
|
|
|
|
|
-module.exports = app => {
|
|
|
+module.exports = (app) => {
|
|
|
const { mongoose } = app;
|
|
|
return mongoose.model('Config', schema, 'config');
|
|
|
};
|