Drop qt_users dependency for configs and track app version

This commit is contained in:
Mikhail Chusavitin
2026-02-05 15:07:23 +03:00
parent 77c00de97a
commit 548a256d04
14 changed files with 103 additions and 31 deletions

View File

@@ -42,8 +42,9 @@ func (c ConfigItems) Total() float64 {
type Configuration struct {
ID uint `gorm:"primaryKey;autoIncrement" json:"id"`
UUID string `gorm:"size:36;uniqueIndex;not null" json:"uuid"`
UserID uint `gorm:"not null" json:"user_id"` // Legacy owner field (kept for backward compatibility)
UserID *uint `json:"user_id,omitempty"` // Legacy field, no longer required for ownership
OwnerUsername string `gorm:"size:100;not null;default:'';index" json:"owner_username"`
AppVersion string `gorm:"size:64" json:"app_version,omitempty"`
Name string `gorm:"size:200;not null" json:"name"`
Items ConfigItems `gorm:"type:json;not null" json:"items"`
TotalPrice *float64 `gorm:"type:decimal(12,2)" json:"total_price"`