@bluedot-innovation/models 2.0.0-beta.11 → 2.0.0-beta.13

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 ADDED
@@ -0,0 +1,6 @@
1
+ ## 2.0.0-beta.13
2
+ - Beacon model: Added accountId
3
+ - Zone model: Added beacons
4
+
5
+ ## 2.0.0-beta.12
6
+ - User model: `emailAddress` changed to `email`
@@ -1,6 +1,6 @@
1
1
  module.exports = {
2
2
  username: 'test@bluedot.io',
3
- emailAddress: 'test@bluedot.io',
3
+ email: 'test@bluedot.io',
4
4
  password: 'jfmamjasond',
5
5
  firstName: 'John',
6
6
  lastName: 'Citizen',
package/models/Beacon.js CHANGED
@@ -34,7 +34,10 @@ let schema = {
34
34
  }
35
35
  },
36
36
  location: {type: Point},
37
- proximity: {type: String, default: 'Far'}
37
+ proximity: {type: String, default: 'Far'},
38
+ accountId: {
39
+ type: String, required: true
40
+ }
38
41
  }
39
42
 
40
43
  let BeaconSchema = new mongoose.Schema(schema)
package/models/User.js CHANGED
@@ -12,9 +12,10 @@ let UserSchema = new mongoose.Schema({
12
12
  username: {
13
13
  type: String,
14
14
  required: true,
15
- maxlength: 100
15
+ maxlength: 100,
16
+ unique: true
16
17
  },
17
- emailAddress: {
18
+ email: {
18
19
  type: String,
19
20
  required: true,
20
21
  validate: {
package/models/Zone.js CHANGED
@@ -59,7 +59,8 @@ let ZoneSchema = new Schema({
59
59
  required: true
60
60
  },
61
61
  beacons: {
62
- type: [beaconSchema]
62
+ type: [beaconSchema],
63
+ default: []
63
64
  },
64
65
  customData: [{type: Schema.Types.Mixed}],
65
66
  description: {type: String, default: ''},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluedot-innovation/models",
3
- "version": "2.0.0-beta.11",
3
+ "version": "2.0.0-beta.13",
4
4
  "description": "",
5
5
  "main": "Models.js",
6
6
  "scripts": {