Fix jwt-token

This commit is contained in:
2025-09-17 22:43:44 +02:00
parent 43b548c05a
commit 6d66d8d772
8 changed files with 289 additions and 49 deletions

View File

@@ -16,6 +16,15 @@ module.exports = (sequelize) => {
},
comment: 'ID of the detecting device'
},
tenant_id: {
type: DataTypes.UUID,
allowNull: true,
references: {
model: 'tenants',
key: 'id'
},
comment: 'Tenant ID for multi-tenant isolation'
},
drone_id: {
type: DataTypes.BIGINT,
allowNull: false,

View File

@@ -48,6 +48,11 @@ module.exports = (sequelize) => {
defaultValue: 'local',
comment: 'Primary authentication provider'
},
allow_registration: {
type: DataTypes.BOOLEAN,
defaultValue: false,
comment: 'Whether new user registration is allowed for this tenant'
},
auth_config: {
type: DataTypes.JSONB,
allowNull: true,