zhangqian
2023-08-24 e6c81b3916494ef51edc21774a27402d0f16c49c
docs/swagger.json
@@ -512,6 +512,17 @@
                }
            }
        },
        "constvar.PlcMethod": {
            "type": "string",
            "enum": [
                "modbusTCP",
                "serial"
            ],
            "x-enum-varnames": [
                "PlcMethodModbusTCP",
                "PlcMethodSerial"
            ]
        },
        "contextx.Response": {
            "type": "object",
            "properties": {
@@ -528,7 +539,12 @@
            "type": "object",
            "properties": {
                "address": {
                    "description": "PortName   string `gorm:\"type:varchar(191);comment:端口名称\" json:\"portName\"`\nFrequency  int    `gorm:\"type:int(11);comment:数据更新频率 0-实时更新 1-1次/秒\" json:\"frequency\"`",
                    "type": "string"
                },
                "baudRate": {
                    "description": "串口波特率, method = serial时 用",
                    "type": "integer"
                },
                "brand": {
                    "type": "string"
@@ -539,9 +555,6 @@
                        "$ref": "#/definitions/model.DevicePlcAddress"
                    }
                },
                "frequency": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
@@ -549,12 +562,14 @@
                    "type": "boolean"
                },
                "method": {
                    "type": "string"
                    "$ref": "#/definitions/constvar.PlcMethod"
                },
                "port": {
                    "description": "plc 端口号,  method =  modbusTCP用",
                    "type": "integer"
                },
                "portName": {
                "serialName": {
                    "description": "串口名称,method = serial时 用",
                    "type": "string"
                }
            }
@@ -755,7 +770,12 @@
            "type": "object",
            "properties": {
                "address": {
                    "description": "PortName   string `gorm:\"type:varchar(191);comment:端口名称\" json:\"portName\"`\nFrequency  int    `gorm:\"type:int(11);comment:数据更新频率 0-实时更新 1-1次/秒\" json:\"frequency\"`",
                    "type": "string"
                },
                "baudRate": {
                    "description": "串口波特率, method = serial时 用",
                    "type": "integer"
                },
                "brand": {
                    "type": "string"
@@ -766,9 +786,6 @@
                        "$ref": "#/definitions/model.DevicePlcAddress"
                    }
                },
                "frequency": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
@@ -776,12 +793,14 @@
                    "type": "boolean"
                },
                "method": {
                    "type": "string"
                    "$ref": "#/definitions/constvar.PlcMethod"
                },
                "port": {
                    "description": "plc 端口号,  method =  modbusTCP用",
                    "type": "integer"
                },
                "portName": {
                "serialName": {
                    "description": "串口名称,method = serial时 用",
                    "type": "string"
                }
            }