zhangqian
2023-10-12 8516ec462bbcdc95cf853f7b2859942171c19944
model/common/common.go
@@ -74,14 +74,14 @@
   }
   PlcConfig struct {
      Brand      string             `gorm:"type:varchar(191);comment:PLC品牌" json:"brand"`
      Method     constvar.PlcMethod `gorm:"type:varchar(191);comment:接口方式" json:"method"`
      Address    string             `gorm:"type:varchar(191);comment:PLC地址" json:"address"` //plc ip地址, method = modbusTCP用
      Port       int                `gorm:"type:int(11);comment:端口" json:"port"`            //plc 端口号,  method =  modbusTCP用
      BaudRate   int                `gorm:"type:int(11);comment:波特率"  json:"baudRate"`      //串口波特率, method = serial时 用
      SerialName string             `gorm:"type:int(11);comment:串口名称"  json:"serialName"`   //串口名称,method = serial时 用
      IsOpen     bool               `gorm:"type:tinyint(1);comment:是否开启" json:"isOpen"`
      Detail     string             `gorm:"type:varchar(2048);comment:数据详情" json:"-"`
      Brand      string             `gorm:"type:varchar(191)" json:"brand"`   //comment:PLC品牌
      Method     constvar.PlcMethod `gorm:"type:varchar(191)" json:"method"`  //comment:接口方式
      Address    string             `gorm:"type:varchar(191)" json:"address"` //plc ip地址, method = modbusTCP用
      Port       int                `gorm:"type:int(11)" json:"port"`         //plc 端口号,  method =  modbusTCP用
      BaudRate   int                `gorm:"type:int(11)"  json:"baudRate"`    //串口波特率, method = serial时 用
      SerialName string             `gorm:"type:int(11)"  json:"serialName"`  //串口名称,method = serial时 用
      IsOpen     bool               `gorm:"type:tinyint(1)" json:"isOpen"`
      Detail     string             `gorm:"type:varchar(2048)" json:"-"`
      Details    []*PlcAddress      `gorm:"-" json:"details"`
   }