@bluedot-innovation/models 5.1.7 → 5.1.9
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/CHANGELOG.md
CHANGED
package/Models.js
CHANGED
|
@@ -8,7 +8,7 @@ Models.Account = require('./models/Account').Model
|
|
|
8
8
|
Models.Beacon = require('./models/Beacon').Model
|
|
9
9
|
|
|
10
10
|
Models.MessageAction = require('./models/MessageAction').Model
|
|
11
|
-
Models.
|
|
11
|
+
Models.MonthlyStats = require('./models/MonthlyStats').Model
|
|
12
12
|
Models.Project = require('./models/Project').Model
|
|
13
13
|
Models.RuleRequestAggregation = require('./models/RuleRequestAggregation').Model
|
|
14
14
|
Models.UrlAction = require('./models/UrlAction').Model
|
|
@@ -35,12 +35,21 @@ Models.TestDeviceCluster = require('./models/TestDeviceCluster')
|
|
|
35
35
|
Models.TestInstance = require('./models/TestInstance')
|
|
36
36
|
Models.TestScenario = require('./models/TestScenario')
|
|
37
37
|
|
|
38
|
+
// Blue Connect
|
|
39
|
+
Models.AdminPortalUser = require('./models/AdminPortalUser')
|
|
40
|
+
Models.CustomerLogin = require('./models/CustomerLogin')
|
|
41
|
+
Models.NotificationLogEntry = require('./models/NotificationLogEntry')
|
|
42
|
+
Models.DBEvent = require('./models/DBEvent')
|
|
43
|
+
Models.SingleUseToken = require('./models/SingleUseToken')
|
|
44
|
+
Models.Contract = require('./models/Contract')
|
|
45
|
+
Models.DailyStats = require('./models/DailyStats')
|
|
46
|
+
|
|
38
47
|
let Schemas = {}
|
|
39
48
|
|
|
40
49
|
Schemas.Account = require('./models/Account').Schema
|
|
41
50
|
Schemas.Beacon = require('./models/Beacon').Schema
|
|
42
51
|
Schemas.MessageAction = require('./models/MessageAction').Schema
|
|
43
|
-
Schemas.
|
|
52
|
+
Schemas.MonthlyStats = require('./models/MonthlyStats').Schema
|
|
44
53
|
Schemas.Project = require('./models/Project').Schema
|
|
45
54
|
Schemas.RuleRequestAggregation = require('./models/RuleRequestAggregation').Schema
|
|
46
55
|
Schemas.UrlAction = require('./models/UrlAction').Schema
|
|
@@ -2,8 +2,8 @@ let mongoose = require('mongoose')
|
|
|
2
2
|
|
|
3
3
|
mongoose.Promise = global.Promise
|
|
4
4
|
|
|
5
|
-
let MonthlyStatsModel = require('../../Models').
|
|
6
|
-
let MonthlyStatsModelBuiltInMongoose = require('../../Models').
|
|
5
|
+
let MonthlyStatsModel = require('../../Models').MonthlyStats(mongoose)
|
|
6
|
+
let MonthlyStatsModelBuiltInMongoose = require('../../Models').MonthlyStats()
|
|
7
7
|
let describe = require('mocha').describe
|
|
8
8
|
let it = require('mocha').it
|
|
9
9
|
let chai = require('chai')
|
package/models/MonthlyStats.js
CHANGED
|
@@ -32,9 +32,9 @@ const MonthlyStatsSchema = new mongoose.Schema(
|
|
|
32
32
|
let model = (mongooseInstance) => {
|
|
33
33
|
let MonthlyStats
|
|
34
34
|
if (mongooseInstance) {
|
|
35
|
-
MonthlyStats = mongooseInstance.model('
|
|
35
|
+
MonthlyStats = mongooseInstance.model('MonthlyStats', MonthlyStatsSchema)
|
|
36
36
|
} else {
|
|
37
|
-
MonthlyStats = mongoose.model('
|
|
37
|
+
MonthlyStats = mongoose.model('MonthlyStats', MonthlyStatsSchema)
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
return MonthlyStats
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Created by Andrew on 02/03/2017.
|
|
3
|
-
* Copyright : Bluedot
|
|
4
|
-
* Owner :
|
|
3
|
+
* Copyright : Bluedot Innovation.
|
|
5
4
|
*/
|
|
6
5
|
let mongoose = require('mongoose')
|
|
7
6
|
let StateEnum = require('@bluedot-innovation/enums').StateEnum
|
|
@@ -13,11 +12,11 @@ let TestDeviceCluster = mongoose.model('TestDeviceCluster', new mongoose.Schema(
|
|
|
13
12
|
'creationTime': {type: Date, default: Date.now},
|
|
14
13
|
'lastUpdateTime': {type: Date, default: Date.now},
|
|
15
14
|
comments: String,
|
|
16
|
-
state: {type: String, default: StateEnum.
|
|
15
|
+
state: {type: String, default: StateEnum.ACTIVE}
|
|
17
16
|
},
|
|
18
17
|
{
|
|
19
18
|
collection: 'testDeviceCluster'
|
|
20
19
|
})
|
|
21
20
|
)
|
|
22
21
|
|
|
23
|
-
module.exports = TestDeviceCluster
|
|
22
|
+
module.exports = TestDeviceCluster
|
package/models/TestInstance.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Created by Andrew on 02/03/2017.
|
|
3
|
-
* Copyright : Bluedot
|
|
4
|
-
* Owner :
|
|
3
|
+
* Copyright : Bluedot Innovation.
|
|
5
4
|
*/
|
|
6
5
|
let mongoose = require('mongoose')
|
|
7
6
|
let StateEnum = require('@bluedot-innovation/enums').StateEnum
|
|
@@ -19,7 +18,8 @@ let TestInstance = mongoose.model('TestInstance', new mongoose.Schema(
|
|
|
19
18
|
trackedLocations: {type: Array, default: []},
|
|
20
19
|
'creationTime': {type: Date, default: Date.now},
|
|
21
20
|
'lastUpdateTime': {type: Date, default: Date.now},
|
|
22
|
-
state: {type: String, default: StateEnum.
|
|
21
|
+
state: {type: String, default: StateEnum.ACTIVE},
|
|
22
|
+
isValid: {type: Boolean, default: true},
|
|
23
23
|
comments: String,
|
|
24
24
|
isProduction: Boolean,
|
|
25
25
|
sdkVersion: String
|
package/package.json
CHANGED