feat: add short_code field to device login API
- Add optional short_code parameter to DeviceLoginRequest - Add ShortCode field to Device model - Save short_code to database during device registration - Add database migration for user_device.short_code column - Fix duplicate variable declaration in routes.go
This commit is contained in:
@@ -81,6 +81,7 @@ type Device struct {
|
||||
UserId int64 `gorm:"index:idx_user_id;not null;comment:User ID"`
|
||||
UserAgent string `gorm:"default:null;comment:UserAgent."`
|
||||
Identifier string `gorm:"type:varchar(255);unique;index:idx_identifier;default:'';comment:Device Identifier"`
|
||||
ShortCode string `gorm:"type:varchar(255);default:'';comment:Short Code"`
|
||||
Online bool `gorm:"default:false;not null;comment:Online"`
|
||||
Enabled bool `gorm:"default:true;not null;comment:Enabled"`
|
||||
CreatedAt time.Time `gorm:"<-:create;comment:Creation Time"`
|
||||
|
||||
Reference in New Issue
Block a user