Fix jwt-token
This commit is contained in:
@@ -16,22 +16,51 @@ module.exports = (sequelize) => {
|
||||
},
|
||||
comment: 'ID of the device sending heartbeat'
|
||||
},
|
||||
tenant_id: {
|
||||
type: DataTypes.UUID,
|
||||
allowNull: true,
|
||||
references: {
|
||||
model: 'tenants',
|
||||
key: 'id'
|
||||
},
|
||||
comment: 'Tenant ID for multi-tenancy support'
|
||||
},
|
||||
device_key: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true, // Allow null for testing
|
||||
defaultValue: 'test-device-key',
|
||||
comment: 'Unique key of the sensor from heartbeat message'
|
||||
},
|
||||
status: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true,
|
||||
comment: 'Device status (online, offline, error, etc.)'
|
||||
},
|
||||
timestamp: {
|
||||
type: DataTypes.DATE,
|
||||
allowNull: true,
|
||||
comment: 'Timestamp from device'
|
||||
},
|
||||
uptime: {
|
||||
type: DataTypes.BIGINT,
|
||||
allowNull: true,
|
||||
comment: 'Device uptime in seconds'
|
||||
},
|
||||
memory_usage: {
|
||||
type: DataTypes.INTEGER,
|
||||
type: DataTypes.FLOAT,
|
||||
allowNull: true,
|
||||
comment: 'Memory usage percentage'
|
||||
},
|
||||
cpu_usage: {
|
||||
type: DataTypes.FLOAT,
|
||||
allowNull: true,
|
||||
comment: 'CPU usage percentage'
|
||||
},
|
||||
disk_usage: {
|
||||
type: DataTypes.FLOAT,
|
||||
allowNull: true,
|
||||
comment: 'Disk usage percentage'
|
||||
},
|
||||
firmware_version: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true,
|
||||
|
||||
Reference in New Issue
Block a user