|
@@ -7,12 +7,16 @@ const metaPlugin = require('naf-framework-mongoose-free/lib/model/meta-plugin');
|
|
|
const test = {
|
|
|
name: { type: String, required: false, zh: '名称' }, //
|
|
|
brief: { type: String, required: false, zh: '简介' }, //
|
|
|
+ path: { type: String, required: false, zh: '视频流' }, //
|
|
|
+ is_use: { type: String, required: false, zh: '是否启用', default: '0' }, //
|
|
|
};
|
|
|
const schema = new Schema(test, { toJSON: { getters: true, virtuals: true } });
|
|
|
schema.index({ id: 1 });
|
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
|
schema.index({ name: 1 });
|
|
|
-
|
|
|
+schema.index({ brief: 1 });
|
|
|
+schema.index({ path: 1 });
|
|
|
+schema.index({ is_use: 1 });
|
|
|
schema.plugin(metaPlugin);
|
|
|
|
|
|
module.exports = app => {
|