@francesco_ksh/app-ksh-mgd-schemas 2.6.6 → 2.6.8

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.
package/models/Chat.js CHANGED
@@ -86,7 +86,10 @@ const chatSchema = new Schema(
86
86
  default: Date.now,
87
87
  },
88
88
  },
89
- { supressReservedKeysWarning: true }
89
+ {
90
+ timestamps: true,
91
+ supressReservedKeysWarning: true
92
+ }
90
93
  );
91
94
 
92
95
  module.exports = chatSchema;
@@ -58,7 +58,10 @@ const chatMessagesSchema = new Schema(
58
58
  default: Date.now,
59
59
  },
60
60
  },
61
- { supressReservedKeysWarning: true }
61
+ {
62
+ timestamps: true,
63
+ supressReservedKeysWarning: true
64
+ }
62
65
  );
63
66
 
64
67
  module.exports = chatMessagesSchema;
package/models/Comment.js CHANGED
@@ -18,34 +18,25 @@ const commentSchema = new Schema(
18
18
  status: {
19
19
  type: String,
20
20
  default: 'active',
21
+ enum: ['active', 'reported'],
21
22
  },
22
23
  date: {
23
24
  type: Date,
24
25
  },
25
- replies: [
26
+ replies: [new Schema(
26
27
  {
27
- text: {
28
- type: String,
29
- },
28
+ text: String,
30
29
  sender: {
31
30
  type: Schema.Types.ObjectId,
32
31
  ref: 'User',
33
32
  },
34
-
35
- seen: {
36
- type: Boolean,
37
- },
38
- date: {
39
- type: Date,
40
- },
41
- type: {
42
- type: String,
43
- },
44
- imageUrl: {
45
- type: String,
46
- },
33
+ seen: Boolean,
34
+ date: Date,
35
+ type: String,
36
+ imageUrl: String,
47
37
  },
48
- ],
38
+ { timestamps: true }
39
+ )],
49
40
  imageUrl: {
50
41
  type: String,
51
42
  default: null,
@@ -54,7 +45,10 @@ const commentSchema = new Schema(
54
45
  type: String,
55
46
  },
56
47
  },
57
- { supressReservedKeysWarning: true }
48
+ {
49
+ timestamps: true,
50
+ supressReservedKeysWarning: true
51
+ }
58
52
  );
59
53
 
60
54
  module.exports = commentSchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@francesco_ksh/app-ksh-mgd-schemas",
3
- "version": "2.6.6",
3
+ "version": "2.6.8",
4
4
  "description": "Mongoose schema definitions",
5
5
  "main": "index.js",
6
6
  "repository": {