|
@@ -8,12 +8,15 @@ const actTags = {
|
|
value: { type: String, required: false, zh: '编码' }, //
|
|
value: { type: String, required: false, zh: '编码' }, //
|
|
sort: { type: Number, default: 0, required: false, zh: '排序' }, //
|
|
sort: { type: Number, default: 0, required: false, zh: '排序' }, //
|
|
status: { type: String, required: false, default: '0', zh: '状态' }, // 字典:use
|
|
status: { type: String, required: false, default: '0', zh: '状态' }, // 字典:use
|
|
|
|
+ file: { type: Array, required: false, zh: '图片' }, //
|
|
|
|
+ show_index: { type: String, required: false, default: '0', zh: '是否在首页展示' }, // 字典:use
|
|
};
|
|
};
|
|
const schema = new Schema(actTags, { toJSON: { getters: true, virtuals: true } });
|
|
const schema = new Schema(actTags, { toJSON: { getters: true, virtuals: true } });
|
|
schema.index({ id: 1 });
|
|
schema.index({ id: 1 });
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
schema.index({ sort: 1 });
|
|
schema.index({ sort: 1 });
|
|
schema.index({ status: 1 });
|
|
schema.index({ status: 1 });
|
|
|
|
+schema.index({ show_index: 1 });
|
|
|
|
|
|
schema.plugin(metaPlugin);
|
|
schema.plugin(metaPlugin);
|
|
|
|
|