|
@@ -6,9 +6,11 @@ const metaPlugin = require('naf-framework-mongoose-free/lib/model/meta-plugin');
|
|
|
// 新闻资讯
|
|
|
const news = {
|
|
|
type: { type: String, required: false, zh: '新闻类型' }, // 字典表:news_type
|
|
|
+ place: { type: String, required: false, zh: '展示位置' }, //
|
|
|
title: { type: String, required: false, zh: '标题' }, //
|
|
|
origin: { type: String, required: false, default: '系统管理员', zh: '来源' }, //
|
|
|
create_time: { type: String, required: false, zh: '时间' }, //
|
|
|
+ brief: { type: String, required: false, zh: '简介' }, //
|
|
|
img_url: { type: Array, required: false, zh: '图片' }, //
|
|
|
file_url: { type: Array, required: false, zh: '文件' }, //
|
|
|
content: { type: String, required: false, zh: '内容' }, //
|
|
@@ -18,6 +20,7 @@ const schema = new Schema(news, { toJSON: { getters: true, virtuals: true } });
|
|
|
schema.index({ id: 1 });
|
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
|
schema.index({ type: 1 });
|
|
|
+schema.index({ place: 1 });
|
|
|
schema.index({ title: 1 });
|
|
|
schema.index({ origin: 1 });
|
|
|
schema.index({ create_time: 1 });
|