@justair/justair-library 4.2.0 → 4.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justair/justair-library",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "JustAir Internal Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -14,6 +14,33 @@ const parametersEnum = [
14
14
  "WS And Direction",
15
15
  ];
16
16
 
17
+ const noteSchema = mongoose.Schema({
18
+ note: {
19
+ type: String,
20
+ required: true,
21
+ },
22
+ type: {
23
+ type: String,
24
+ required: true,
25
+ },
26
+ monitorState: {
27
+ type: String,
28
+ required: true,
29
+ },
30
+ adminId: {
31
+ type: mongoose.Types.ObjectId,
32
+ ref: "Admin",
33
+ required: true,
34
+ },
35
+ adminName: {
36
+ type: String,
37
+ },
38
+ date: {
39
+ type: Date,
40
+ default: Date.now,
41
+ },
42
+ });
43
+
17
44
  const correctionSchema = mongoose.Schema(
18
45
  {
19
46
  equationType: {
@@ -150,7 +177,7 @@ const monitorsSchema = mongoose.Schema(
150
177
  ],
151
178
  latestPM2_5: Number,
152
179
  latestAQI_PM2_5: Number,
153
- notes: [Object],
180
+ notes: [noteSchema],
154
181
  calculatedAverages: [Object],
155
182
  images: [String],
156
183
  isActive: { type: Boolean, default: true },