mirror of
https://github.com/gl-inet/glkvm-cloud.git
synced 2026-09-12 05:48:57 +00:00
dff4d06107
- Align API behavior with frontend integration - Fix issues found during joint debugging Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
16 lines
765 B
Go
Executable File
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"
|
|
}
|