add tacking

This commit is contained in:
Fran Jurmanović
2025-05-24 00:44:26 +02:00
parent 31a2b73cf9
commit edf5a2c8c4
11 changed files with 210 additions and 12 deletions

View File

@@ -10,7 +10,7 @@ import (
type IntString int
// Config tracks configuration modifications
type Config struct {
type Config struct {
ID uint `json:"id" gorm:"primaryKey"`
ServerID uint `json:"serverId" gorm:"not null"`
ConfigFile string `json:"configFile" gorm:"not null"` // e.g. "settings.json"
@@ -128,4 +128,12 @@ func (i *IntString) UnmarshalJSON(b []byte) error {
}
return fmt.Errorf("invalid postQualySeconds value")
}
func (i IntString) ToString() string {
return strconv.Itoa(int(i))
}
func (i IntString) ToInt() (int) {
return int(i)
}