package models type GatewaySerial struct { ID string `gorm:"type:varchar(32);primary_key"` ComID int `gorm:"type:int;primary_key"` Interface string `gorm:"type:varchar(32);not null"` Address string `gorm:"type:varchar(32);not null"` BaudRate int `gorm:"type:int;not null"` DataBits int `gorm:"type:int;not null"` StopBits int `gorm:"type:int;not null"` Parity string `gorm:"type:varchar(6)"` Timeout int `gorm:"type:int;not null"` ProtocolType int `gorm:"type:int;not null"` //协议类型,0:modbus-rtu;1:长和单灯集控zigbee LcModel } func (GatewaySerial) TableName() string { return "t_gateway_serial" }