created tracker api endpoint and created UI interface for trackers

This commit is contained in:
dtv
2025-10-04 20:18:59 +03:00
parent 269b098f0d
commit 2b863776ae
16 changed files with 597 additions and 8 deletions

View File

@@ -10,11 +10,12 @@ const (
)
type User struct {
ID uint `gorm:"primaryKey"`
Username string `gorm:"uniqueIndex;size:255;not null"`
Password string `gorm:"not null"`
Role Role `gorm:"type:varchar(16);not null;default:'user'"`
Devices []Device `gorm:"many2many:user_devices;constraint:OnDelete:CASCADE;"`
ID uint `gorm:"primaryKey"`
Username string `gorm:"uniqueIndex;size:255;not null"`
Password string `gorm:"not null"`
Role Role `gorm:"type:varchar(16);not null;default:'user'"`
Devices []Device `gorm:"many2many:user_devices;constraint:OnDelete:CASCADE;"`
Trackers []Tracker `gorm:"many2many:user_trackers;constraint:OnDelete:CASCADE;"`
CreatedAt time.Time
UpdatedAt time.Time
}