dev_devinfo.gen.go 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Code generated by gorm.io/gen. DO NOT EDIT.
  2. // Code generated by gorm.io/gen. DO NOT EDIT.
  3. // Code generated by gorm.io/gen. DO NOT EDIT.
  4. package model
  5. import (
  6. "time"
  7. )
  8. const TableNameDevDevinfo = "dev_devinfo"
  9. // DevDevinfo mapped from table <dev_devinfo>
  10. type DevDevinfo struct {
  11. ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` // 设备信息表
  12. Stationid int32 `gorm:"column:stationid" json:"stationid"` // 所属变电站ID
  13. Deviceid int32 `gorm:"column:deviceid" json:"deviceid"` // 设备ID,查询变电框架返回
  14. Devicename string `gorm:"column:devicename" json:"devicename"` // 设备名称
  15. Appid int32 `gorm:"column:appid" json:"appid"` // 所属APP ID
  16. Modelid int32 `gorm:"column:modelid" json:"modelid"` // 所属模型ID
  17. Protocol string `gorm:"column:protocol" json:"protocol"` // 采集协议
  18. Serial string `gorm:"column:serial" json:"serial"` // 串口地址
  19. Baudrate int32 `gorm:"column:baudrate" json:"baudrate"` // 串口波特率
  20. Stopbit int32 `gorm:"column:stopbit" json:"stopbit"` // 串口停止位
  21. Checkbit string `gorm:"column:checkbit" json:"checkbit"` // 串口检测位
  22. Databit int32 `gorm:"column:databit" json:"databit"` // 串口数据位
  23. Slaveid int32 `gorm:"column:slaveid" json:"slaveid"` // 从设备ID
  24. IP string `gorm:"column:ip" json:"ip"` // IP地址
  25. Port int32 `gorm:"column:port" json:"port"` // 端口号(modbus tcp)
  26. Eid string `gorm:"column:eid" json:"eid"` // 微功耗传感器ID
  27. Mqtttopic string `gorm:"column:mqtttopic" json:"mqtttopic"` // mqtt采集协议时对应的主题
  28. Disable int32 `gorm:"column:disable" json:"disable"` // 设备禁用标志。1未禁用 2禁用
  29. Online int32 `gorm:"column:online;default:2" json:"online"` // 设备在线状态。1离线 2在线 3超时,持续超时次数5次则离线
  30. RegionId int32 `gorm:"column:region_id" json:"region_id"` // 区域id
  31. DevTypeId int32 `gorm:"column:dev_type_id" json:"dev_type_id"` // 设备类型id
  32. CreateAt time.Time `gorm:"->" json:"create_at" c:"-"` // 创建时间
  33. UpdateAt time.Time `gorm:"->" json:"update_at" c:"-"` // 更新时间
  34. }
  35. // TableName DevDevinfo's table name
  36. func (*DevDevinfo) TableName() string {
  37. return TableNameDevDevinfo
  38. }