package dao import "server/global" type Device struct { global.GVA_MODEL DeviceCode string `gorm:"size:50;not null;uniqueIndex" json:"device_code"` // 设备编码 DeviceName string `gorm:"size:100;not null" json:"device_name"` // 设备名称 DeviceType string `gorm:"size:50;not null" json:"device_type"` // 设备类别 IPAddress string `gorm:"size:50" json:"ip_address"` // IP地址 Port int `json:"port"` // 端口 Status string `gorm:"size:20;default:'offline'" json:"status"` // 设备状态 Description string `gorm:"size:200" json:"description"` // 备注 } func (Device) TableName() string { return "device" }