Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit c9a3735

Browse files
added indexes to system notification model
1 parent cdc90b3 commit c9a3735

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

server/models/system-notifications.model.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
module.exports = function (app) {
66
const mongooseClient = app.get('mongooseClient');
77
const systemNotifications = new mongooseClient.Schema({
8-
type: { type: String, default: 'info' },
9-
title: { type: String },
10-
content: { type: String },
11-
slot: { type: String },
12-
language: { type: String },
8+
type: { type: String, default: 'info', required: true, index: true },
9+
title: { type: String, required: true },
10+
content: { type: String, required: true },
11+
slot: { type: String, required: true, index: true },
12+
language: { type: String, required: true, index: true },
1313
permanent: { type: Boolean, default: false },
1414
requireConfirmation: { type: Boolean, default: false },
15-
active: { type: Boolean, default: true },
15+
active: { type: Boolean, default: true, index: true },
1616
totalCount: { type: Number, default: 0 },
1717
createdAt: { type: Date, default: Date.now },
1818
updatedAt: { type: Date, default: Date.now },

0 commit comments

Comments
 (0)