lrf402788946 пре 4 година
родитељ
комит
8c01889f36

+ 1 - 0
app/model/admin.js

@@ -26,6 +26,7 @@ schema.index({ phone: 1 });
 schema.index({ role: 1 });
 schema.index({ pid: 1 });
 schema.index({ code: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/category.js

@@ -12,6 +12,7 @@ const category = {
 };
 const schema = new Schema(category, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/channel.js

@@ -18,6 +18,7 @@ const channel = {
 };
 const schema = new Schema(channel, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/channel_video.js

@@ -16,6 +16,7 @@ const channel_video = {
 };
 const schema = new Schema(channel_video, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/code.js

@@ -14,6 +14,7 @@ const code = {
 };
 const schema = new Schema(code, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/column.js

@@ -12,6 +12,7 @@ const column = {
 };
 const schema = new Schema(column, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/dock.js

@@ -41,6 +41,7 @@ const dock = {
 };
 const schema = new Schema(dock, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/dock_pw.js

@@ -16,6 +16,7 @@ const dockpw = {
 };
 const schema = new Schema(dockpw, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/dock_user.js

@@ -21,6 +21,7 @@ const schema = new Schema(dockUser, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
 schema.index({ dock_id: 1 });
 schema.index({ status: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/expert.js

@@ -33,6 +33,7 @@ schema.index({ id: 1 });
 schema.index({ phone: 1 });
 schema.index({ code: 1 });
 schema.index({ status: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/interview.js

@@ -20,6 +20,7 @@ const interview = {
 const schema = new Schema(interview, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
 schema.index({ title: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/invite_code.js

@@ -14,6 +14,7 @@ const invite_code = {
 const schema = new Schema(invite_code, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
 schema.index({ code: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/menu.js

@@ -13,6 +13,7 @@ const menu = {
 };
 const schema = new Schema(menu, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/news.js

@@ -29,6 +29,7 @@ const news = {
 const schema = new Schema(news, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
 schema.index({ title: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/notice.js

@@ -20,6 +20,7 @@ schema.index({ id: 1 });
 schema.index({ title: 1 });
 schema.index({ user_id: 1 });
 schema.index({ code: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/organization.js

@@ -39,6 +39,7 @@ schema.index({ phone: 1 });
 schema.index({ profession: 1 });
 schema.index({ institution_code: 1 });
 schema.index({ companyperson: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/patent.js

@@ -22,6 +22,7 @@ const PatentSchema = {
 
 const schema = new Schema(PatentSchema, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 
 module.exports = app => {

+ 1 - 0
app/model/person_chat.js

@@ -20,6 +20,7 @@ schema.index({ sender_id: 1 });
 schema.index({ sender_name: 1 });
 schema.index({ receiver_id: 1 });
 schema.index({ receiver_name: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/person_room.js

@@ -17,6 +17,7 @@ const schema = new Schema(person_room, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
 schema.index({ p1_id: 1 });
 schema.index({ p2_id: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/personal.js

@@ -27,6 +27,7 @@ schema.index({ phone: 1 });
 schema.index({ code: 1 });
 schema.index({ status: 1 });
 schema.index({ profession: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/product.js

@@ -62,6 +62,7 @@ schema.index({ qqwx: 1 });
 schema.index({ type: 1 });
 schema.index({ status: 1 });
 schema.index({ company: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/road_show.js

@@ -24,6 +24,7 @@ schema.index({ dock_id: 1 });
 schema.index({ title: 1 });
 schema.index({ origin: 1 });
 schema.index({ publish_time: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/science.js

@@ -17,6 +17,7 @@ const science = {
 };
 const schema = new Schema(science, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/survey.js

@@ -23,6 +23,7 @@ const survey = {
 const schema = new Schema(survey, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
 schema.index({ user_id: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/train_live.js

@@ -39,6 +39,7 @@ schema.index({ province: 1 });
 schema.index({ city: 1 });
 schema.index({ user: 1 });
 schema.index({ phone: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 1 - 0
app/model/transaction.js

@@ -32,6 +32,7 @@ schema.index({ dock_id: 1 });
 schema.index({ supplier: 1 });
 schema.index({ demander: 1 });
 schema.index({ product: 1 });
+schema.index({ 'meta.createdAt': 1 });
 schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;

+ 5 - 5
config/config.default.js

@@ -39,11 +39,11 @@ module.exports = appInfo => {
   config.mongoose = {
     url: `mongodb://localhost:27017/${config.dbName}`,
     options: {
-      // user: 'admin',
-      // pass: '111111',
-      // authSource: 'admin',
-      // useNewUrlParser: true,
-      // useCreateIndex: true,
+      user: 'admin',
+      pass: '111111',
+      authSource: 'admin',
+      useNewUrlParser: true,
+      useCreateIndex: true,
     },
   };