mqtt-devices-parser 1.0.26 → 1.0.27

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
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.27
4
+ feat(db): adds variants table
5
+
3
6
  ## 1.0.26
4
7
  feat: src/device/device: request fw/wifi/get
5
8
  on device online reporting and if device is connected through wifi
@@ -31,6 +31,13 @@ module.exports = (sequelize,DataTypes)=>{
31
31
  key: 'id'
32
32
  }
33
33
  },
34
+ variant_id: {
35
+ type: DataTypes.INTEGER,
36
+ references: {
37
+ model: 'variants',
38
+ key: 'id'
39
+ }
40
+ },
34
41
  version: {
35
42
  type: DataTypes.STRING,
36
43
  allowNull: true
@@ -29,6 +29,13 @@ module.exports = (sequelize,DataTypes)=>{
29
29
  key: 'id'
30
30
  },
31
31
  },
32
+ variant_id: {
33
+ type: DataTypes.INTEGER,
34
+ references: {
35
+ model: 'variants',
36
+ key: 'id'
37
+ }
38
+ },
32
39
  token: {
33
40
  type: DataTypes.STRING,
34
41
  allowNull: true
@@ -0,0 +1,23 @@
1
+
2
+ module.exports = (sequelize,DataTypes)=>{
3
+ return sequelize.define("variants", {
4
+ name: {
5
+ type: DataTypes.STRING,
6
+ unique: true
7
+ },
8
+ model_id: {
9
+ type: DataTypes.INTEGER,
10
+ references: {
11
+ model: 'models',
12
+ key: 'id'
13
+ }
14
+ },
15
+ description: {
16
+ type: DataTypes.STRING
17
+ },
18
+ },
19
+ {
20
+ tableName: 'variants',
21
+ freezeTableName: true
22
+ })
23
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mqtt-devices-parser",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {