Files
Livebeat/backend/models/notifications/notification.schema.ts
Mondei1 533749c7c8 Notification system enhanced
- Base for notifcation center
- Show text in map if no data is available
2020-11-21 14:11:26 +01:00

15 lines
405 B
TypeScript

import { Schema, SchemaTypes } from 'mongoose';
const schemaNotification = new Schema({
type: { type: String, required: true },
severity: { type: Number, required: true },
message: { type: Object, required: true },
user: { type: SchemaTypes.ObjectId }
}, {
timestamps: {
createdAt: true,
updatedAt: false
},
versionKey: false
});
export { schemaNotification };