| | |
| | | // Device 设备 |
| | | Device struct { |
| | | gorm.Model |
| | | DeviceID string `gorm:"unique;column:device_id;type:varchar(255);not null;default ''" json:"deviceID"` //设备编号 |
| | | DeviceID string `gorm:"column:device_id;type:varchar(255);not null;unique" json:"deviceID"` //设备编号 |
| | | ExtChannelAmount int `gorm:"type:tinyint;default:0" json:"extChannelAmount"` |
| | | Procedures string `gorm:"column:procedure;type:varchar(255);not null;default ''" json:"procedures"` //设备支持的工序,用逗号分隔 |
| | | ProceduresArr []string `gorm:"-" json:"procedureAdd"` //设备支持的工序切片 |
| | |
| | | // DevicePlc 设备的PLC配置 |
| | | DevicePlc struct { |
| | | gorm.Model |
| | | DeviceID string `gorm:"column:device_id;type:varchar(255);not null;unique_index" json:"deviceID"` //设备编号 |
| | | DeviceID string `gorm:"column:device_id;type:varchar(255);not null;unique" json:"deviceID"` //设备编号 |
| | | Brand string `gorm:"type:varchar(191)" json:"brand"` |
| | | Method constvar.PlcMethod `gorm:"type:varchar(191)" json:"method"` |
| | | Address string `gorm:"type:varchar(191)" json:"address"` //plc ip地址, method = modbusTCP用 |