Save hashed PW. Simplify model update. Bugfixes & improvements. Working user-settings & games.

This commit is contained in:
MaxJa4
2024-01-18 19:00:32 +01:00
parent f8ac93f163
commit f2ab72ba1e
20 changed files with 310 additions and 113 deletions

12
models/user_settings.go Normal file
View File

@@ -0,0 +1,12 @@
package models
type UserSettings struct {
ID uint `json:"id" gorm:"primary_key"`
Username string `json:"username"`
User User `json:"user" gorm:"foreignKey:Username;references:Username"`
ActiveGameID uint `json:"active_game_id"`
ActiveGame Game `json:"active_game" gorm:"foreignKey:ID;references:ActiveGameID"`
SquadColors bool `json:"squad_colors" default:"1"`
CalcMedian bool `json:"calc_median" default:"0"`
UseCache bool `json:"use_cache" default:"1"`
}