mirror of
https://github.com/gl-inet/glkvm-cloud.git
synced 2026-09-24 11:36:19 +00:00
6a01778bec
Add API endpoints to manage devices, device groups, users, and user groups. Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
15 lines
667 B
Go
Executable File
15 lines
667 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.
|
|
}
|
|
|
|
// TableName sets the name of the table in the database that this struct binds to.
|
|
func (DeviceMeta) TableName() string {
|
|
return "devices"
|
|
}
|