serial.go 690 B

12345678910111213141516171819
  1. package models
  2. type GatewaySerial struct {
  3. ID string `gorm:"type:varchar(32);primary_key"`
  4. ComID int `gorm:"type:int;primary_key"`
  5. Interface string `gorm:"type:varchar(32);not null"`
  6. Address string `gorm:"type:varchar(32);not null"`
  7. BaudRate int `gorm:"type:int;not null"`
  8. DataBits int `gorm:"type:int;not null"`
  9. StopBits int `gorm:"type:int;not null"`
  10. Parity string `gorm:"type:varchar(6)"`
  11. Timeout int `gorm:"type:int;not null"`
  12. ProtocolType int `gorm:"type:int;not null"` //协议类型,0:modbus-rtu;1:长和单灯集控zigbee
  13. LcModel
  14. }
  15. func (GatewaySerial) TableName() string {
  16. return "t_gateway_serial"
  17. }