Files
GL.iNet-Yongping.Xie dff4d06107 fix: sync with frontend and fix bugs
- Align API behavior with frontend integration
- Fix issues found during joint debugging

Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
2026-02-05 18:22:29 -08:00

16 lines
765 B
Go
Executable File

package model
// DeviceMeta represents device metadata stored in the devices table.
type DeviceMeta struct {
DeviceID string `gorm:"column:ddns"` // DeviceID maps to devices.ddns.
Mac string `gorm:"column:mac"` // Mac is the unique and immutable MAC address of the device.
IP string `gorm:"column:ip"` // IP is the current IP address of the device.
Description string `gorm:"column:description"` // Description is a human-readable description of the device.
Client string `gorm:"column:client"` // Client reported by device (e.g. "rtty-go").
}
// TableName sets the name of the table in the database that this struct binds to.
func (DeviceMeta) TableName() string {
return "devices"
}