|
5 | 5 | module.exports = function (app) {
|
6 | 6 | const mongooseClient = app.get('mongooseClient');
|
7 | 7 | 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 }, |
13 | 13 | permanent: { type: Boolean, default: false },
|
14 | 14 | requireConfirmation: { type: Boolean, default: false },
|
15 |
| - active: { type: Boolean, default: true }, |
| 15 | + active: { type: Boolean, default: true, index: true }, |
16 | 16 | totalCount: { type: Number, default: 0 },
|
17 | 17 | createdAt: { type: Date, default: Date.now },
|
18 | 18 | updatedAt: { type: Date, default: Date.now },
|
|
0 commit comments