package models import "time" // NTPSettings — single-row, mirrors chrony.conf globals plus // listen-bind decisions. type NTPSettings struct { ID int64 `gorm:"primaryKey" json:"id"` ListenAddresses string `gorm:"column:listen_addresses" json:"listen_addresses"` AllowACL string `gorm:"column:allow_acl" json:"allow_acl"` ServeClients bool `gorm:"column:serve_clients" json:"serve_clients"` MakestepSecs float64 `gorm:"column:makestep_secs" json:"makestep_secs"` MakestepLimit int `gorm:"column:makestep_limit" json:"makestep_limit"` RTCSync bool `gorm:"column:rtcsync" json:"rtcsync"` LeapsecTZ *string `gorm:"column:leapsectz" json:"leapsectz,omitempty"` UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at"` } func (NTPSettings) TableName() string { return "ntp_settings" } // NTPPool — one upstream entry. Kind 'pool' triggers DNS round-robin // (chrony adds N sources from the A-record set), 'server' is a single // host. type NTPPool struct { ID int64 `gorm:"primaryKey" json:"id"` Kind string `gorm:"column:kind" json:"kind"` Address string `gorm:"column:address" json:"address"` Iburst bool `gorm:"column:iburst" json:"iburst"` Prefer bool `gorm:"column:prefer" json:"prefer"` MinPoll *int `gorm:"column:minpoll" json:"minpoll,omitempty"` MaxPoll *int `gorm:"column:maxpoll" json:"maxpoll,omitempty"` Active bool `gorm:"column:active" json:"active"` Description *string `gorm:"column:description" json:"description,omitempty"` CreatedAt time.Time `gorm:"column:created_at" json:"created_at"` UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at"` } func (NTPPool) TableName() string { return "ntp_pools" }