From 36a8d4505d6f2ce688f8d7df451adfa29ee9950c Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期一, 09 十月 2023 10:21:24 +0800
Subject: [PATCH] update swagger
---
model/common/common.go | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/model/common/common.go b/model/common/common.go
index 5eafc0d..2b3e2c9 100644
--- a/model/common/common.go
+++ b/model/common/common.go
@@ -51,6 +51,7 @@
OutputMaterials []*ProcedureMaterial `json:"outputMaterials"` // 杈撳嚭鐗╂枡鍒楄〃
Workers []*ProcedureWorker `json:"workers"` // 浜哄憳鍒楄〃
AllProcedureNames []string `json:"allProcedureNames"` // 鎵�灞炲伐鍗曞伐搴忓垪琛�
+ Channel int32 `json:"channel"` //閫氶亾搴忓彿
}
DeliverScheduleTask struct {
@@ -68,8 +69,8 @@
KeyData []byte
AddressData []byte
DeviceId string
- PlcAddressList []*PlcAddress
- PlcConfig PlcConfig
+ PlcAddressList []*PlcAddress //plc 瀹屾垚閲忥紝鎬婚噺锛� 璇诲啓鍦板潃
+ PlcConfig PlcConfig //鐢ㄧ綉鍙h繕鏄鍙d互鍙婄綉鍙p port
}
PlcConfig struct {
@@ -86,7 +87,7 @@
PlcAddress struct {
DeviceID string `json:"deviceID"` // 璁惧id
- Position int `json:"position"` // 鐢熶骇浣嶇疆锛屼竴涓満鍣ㄥ彲鑳芥湁澶氫釜鏈轰綅锛岄渶瑕佸垎鍒厤缃畃lc鍦板潃
+ Channel int `json:"channel"` // 鐢熶骇閫氶亾on锛屼竴涓満鍣ㄥ彲鑳芥湁澶氫釜鏈轰綅锛岄渶瑕佸垎鍒厤缃畃lc鍦板潃
StartAddress int `json:"startAddress"` // 鏁版嵁璧峰鍦板潃
Length int `json:"length"` // 鏁版嵁闀垮害
Type string `json:"type"` // 鏁版嵁绫诲瀷
@@ -125,3 +126,14 @@
IsProcessing bool //鏄惁澶勭悊涓�
IsFinish bool //鏄惁瀹屾垚
}
+
+type Device struct {
+ ID string `gorm:"comment:涓婚敭ID;primaryKey;type:varchar(191);" json:"id"`
+ DeviceProcedureAttr []*DeviceProcedureAttr `json:"deviceProcedureAttr"` // 璁惧宸ュ簭灞炴�у垪琛�
+ ExtChannelAmount int `gorm:"type:tinyint;comment:棰濆鐨勯�氶亾鏁伴噺;default:0;" json:"extChannelAmount"`
+}
+type DeviceProcedureAttr struct {
+ ProcedureID string `gorm:"index;type:varchar(191);comment:宸ュ簭ID" json:"procedureId"`
+ ProcedureName string `gorm:"type:varchar(191);comment:宸ュ簭鍚嶇О" json:"procedureName"`
+ DeviceID string `gorm:"index;type:varchar(191);not null;comment:璁惧ID" json:"deviceId"`
+}
--
Gitblit v1.8.0