27 lines
710 B
Go
27 lines
710 B
Go
package data
|
|
|
|
import (
|
|
"net"
|
|
"time"
|
|
|
|
"dev.sum7.eu/genofire/golang-lib/database"
|
|
)
|
|
|
|
type Client struct {
|
|
Addr HardwareAddr `gorm:"PRIMARY_KEY" json:"addr"`
|
|
APAddr net.IP `gorm:"column:ap" json:"ap"`
|
|
TryProbe uint16 `json:"try_probe"`
|
|
TryAuth uint16 `json:"try_auth"`
|
|
Connected bool `json:"connected"`
|
|
Authed bool `json:"authed"`
|
|
FreqHighest uint16 `json:"freq_highest"`
|
|
SignalLowFreq int16 `json:"signal_low_freq"`
|
|
SignalHighFreq int16 `json:"signal_high_freq"`
|
|
Lastseen time.Time `json:"lastseen"`
|
|
}
|
|
|
|
// Function to initialize the database
|
|
func init() {
|
|
database.AddModel(&Client{})
|
|
}
|