@cool-digital-solutions/interferir-models 1.0.81 → 1.0.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,14 +2,24 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const mongoose_1 = require("mongoose");
4
4
  const _config_1 = require("../config");
5
+ const notification_type_1 = require("../types/notification.type");
5
6
  const notificationSchema = new mongoose_1.Schema({
6
7
  user: {
7
8
  type: mongoose_1.Schema.Types.ObjectId,
8
9
  ref: 'User',
9
10
  required: [true, 'user required!'],
10
11
  },
12
+ company: {
13
+ type: mongoose_1.Schema.Types.ObjectId,
14
+ ref: 'Company',
15
+ default: null,
16
+ },
11
17
  title: { type: String, required: [true, 'title required!'] },
12
18
  message: { type: String, required: [true, 'message required!'] },
19
+ type: { type: String, enum: Object.values(notification_type_1.NotificationType), required: [true, 'type is required!'] },
20
+ messageType: { type: String, enum: Object.values(notification_type_1.MessageType), required: [true, 'messageType is required!'] },
21
+ url: { type: String },
22
+ isRead: { type: Boolean, default: null },
13
23
  updatedDate: { type: Number, index: -1 },
14
24
  createdDate: { type: Number, index: -1 },
15
25
  }, _config_1.schemaOptions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cool-digital-solutions/interferir-models",
3
- "version": "1.0.81",
3
+ "version": "1.0.82",
4
4
  "main": "./dist/index.js",
5
5
  "files": [
6
6
  "dist/**/*"