From 8516ec462bbcdc95cf853f7b2859942171c19944 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 12 十月 2023 18:20:44 +0800
Subject: [PATCH] 去掉注释

---
 model/net_config.go          |   12 ++--
 model/common/common.go       |   16 ++--
 model/device_plc.go          |   18 ++---
 model/plc_brand.go           |    2 
 model/procedures.go          |   16 ++--
 model/production_progress.go |   14 ++--
 model/device.go              |    8 +-
 model/process_model.go       |   14 ++--
 model/work_order.go          |   22 +++---
 9 files changed, 60 insertions(+), 62 deletions(-)

diff --git a/model/common/common.go b/model/common/common.go
index 2b3e2c9..ead7e90 100644
--- a/model/common/common.go
+++ b/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"`   //涓插彛鍚嶇О锛宮ethod = 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"`  //涓插彛鍚嶇О锛宮ethod = serial鏃� 鐢�
+		IsOpen     bool               `gorm:"type:tinyint(1)" json:"isOpen"`
+		Detail     string             `gorm:"type:varchar(2048)" json:"-"`
 		Details    []*PlcAddress      `gorm:"-" json:"details"`
 	}
 
diff --git a/model/device.go b/model/device.go
index 7b7125f..46e2665 100644
--- a/model/device.go
+++ b/model/device.go
@@ -11,10 +11,10 @@
 	// Device 璁惧
 	Device struct {
 		gorm.Model
-		DeviceID         string   `gorm:"unique;column:device_id;type:varchar(255);not null;default '';comment:璁惧缂栧彿" json:"deviceID"` //璁惧缂栧彿
-		ExtChannelAmount int      `gorm:"type:tinyint;comment:棰濆鐨勯�氶亾鏁伴噺;default:0;" json:"extChannelAmount"`
-		Procedures       string   `gorm:"column:procedure;type:varchar(255);not null;default '';comment:宸ュ簭" json:"procedures"` //璁惧鏀寔鐨勫伐搴忥紝鐢ㄩ�楀彿鍒嗛殧
-		ProceduresArr    []string `gorm:"-" json:"procedureAdd"`                                                               //璁惧鏀寔鐨勫伐搴忓垏鐗�
+		DeviceID         string   `gorm:"unique;column:device_id;type:varchar(255);not null;default ''" 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"`                                                    //璁惧鏀寔鐨勫伐搴忓垏鐗�
 	}
 
 	DeviceSearch struct {
diff --git a/model/device_plc.go b/model/device_plc.go
index 830b4cb..9ce9bbc 100644
--- a/model/device_plc.go
+++ b/model/device_plc.go
@@ -13,16 +13,14 @@
 	// DevicePlc 璁惧鐨凱LC閰嶇疆
 	DevicePlc struct {
 		gorm.Model
-		Brand  string             `gorm:"type:varchar(191);comment:PLC鍝佺墝" json:"brand"`
-		Method constvar.PlcMethod `gorm:"type:varchar(191);comment:鎺ュ彛鏂瑰紡" json:"method"`
-		//PortName   string `gorm:"type:varchar(191);comment:绔彛鍚嶇О" json:"portName"`
-		//Frequency  int    `gorm:"comment:鏁版嵁鏇存柊棰戠巼 0-瀹炴椂鏇存柊 1-1娆�/绉�" json:"frequency"`
-		Address    string `gorm:"type:varchar(191);comment:PLC鍦板潃" json:"address"` //plc ip鍦板潃锛� method = modbusTCP鐢�
-		Port       int    `gorm:"comment:绔彛" json:"port"`                         //plc 绔彛鍙凤紝  method =  modbusTCP鐢�
-		BaudRate   int    `gorm:"comment:娉㈢壒鐜�"  json:"baudRate"`                   //涓插彛娉㈢壒鐜囷紝 method = serial鏃� 鐢�
-		SerialName string `gorm:"comment:涓插彛鍚嶇О"  json:"serialName"`                //涓插彛鍚嶇О锛宮ethod = serial鏃� 鐢�
-		IsOpen     bool   `gorm:"comment:鏄惁寮�鍚�" json:"isOpen"`
-		Detail     string `gorm:"type:varchar(2048);comment:鏁版嵁璇︽儏" json:"-"`
+		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鐢�
+		Port       int                `json:"port"`                             //plc 绔彛鍙凤紝  method =  modbusTCP鐢�
+		BaudRate   int                `json:"baudRate"`                         //涓插彛娉㈢壒鐜囷紝 method = serial鏃� 鐢�
+		SerialName string             `json:"serialName"`                       //涓插彛鍚嶇О锛宮ethod = serial鏃� 鐢�
+		IsOpen     bool               `json:"isOpen"`
+		Detail     string             `gorm:"type:varchar(2048)" json:"-"`
 
 		Details []*DevicePlcAddress `gorm:"-" json:"details"`
 
diff --git a/model/net_config.go b/model/net_config.go
index 5c8c4a9..39b9189 100644
--- a/model/net_config.go
+++ b/model/net_config.go
@@ -10,12 +10,12 @@
 type (
 	NetConfig struct {
 		gorm.Model
-		NetworkCard string          `gorm:"type:varchar(100);not null;default '';comment:缃戝崱" json:"networkCard" binding:"required"` //缃戝崱
-		IP          string          `gorm:"type:varchar(100);not null;default '';comment:鏈満ip" json:"ip" binding:"required"`        //鏈満ip
-		MASK        string          `gorm:"type:varchar(100);not null;default '';comment:瀛愮綉鎺╃爜" json:"mask" binding:"required"`      //瀛愮綉鎺╃爜
-		Gateway     string          `gorm:"type:varchar(100);not null;default '';comment:缃戝叧" json:"gateway" binding:"required"`     //缃戝叧
-		DNS         string          `gorm:"type:varchar(100);not null;default '';comment:DNS" json:"dns"`                           //dns
-		Status      NetConfigStatus `gorm:"type:tinyint;not null;default 0;comment:鐘舵�侊紙1鍚姩2绂佺敤锛�" json:"status"`                       //鐘舵�侊紙1鍚敤2绂佺敤锛�
+		NetworkCard string          `gorm:"type:varchar(100);not null;default ''" json:"networkCard" binding:"required"` //缃戝崱
+		IP          string          `gorm:"type:varchar(100);not null;default ''" json:"ip" binding:"required"`          //鏈満ip
+		MASK        string          `gorm:"type:varchar(100);not null;default ''" json:"mask" binding:"required"`        //瀛愮綉鎺╃爜
+		Gateway     string          `gorm:"type:varchar(100);not null;default ''" json:"gateway" binding:"required"`     //缃戝叧
+		DNS         string          `gorm:"type:varchar(100);not null;default ''" json:"dns"`                            //dns
+		Status      NetConfigStatus `gorm:"type:tinyint;not null;default 0" json:"status"`                               //鐘舵�侊紙1鍚敤2绂佺敤锛�
 	}
 
 	NetConfigSearch struct {
diff --git a/model/plc_brand.go b/model/plc_brand.go
index ec3d989..670ab7f 100644
--- a/model/plc_brand.go
+++ b/model/plc_brand.go
@@ -13,7 +13,7 @@
 	// PlcBrand plc鍝佺墝
 	PlcBrand struct {
 		gorm.Model
-		Name string `json:"name" gorm:"column:name;type:varchar(255);not null;default:'';comment:鍚嶇О"`
+		Name string `json:"name" gorm:"column:name;type:varchar(255);not null;default:''"`
 	}
 
 	// PlcBrandSearch plc鍝佺墝鎼滅储鏉′欢
diff --git a/model/procedures.go b/model/procedures.go
index 90b71b5..64d3cbb 100644
--- a/model/procedures.go
+++ b/model/procedures.go
@@ -12,14 +12,14 @@
 type (
 	Procedures struct {
 		gorm.Model         `json:"-"`
-		WorkOrderID        string `gorm:"index;type:varchar(191);not null;comment:宸ュ崟ID" json:"-"`
-		OrderID            string `gorm:"index;type:varchar(191);not null;comment:璁㈠崟ID" json:"-"`
-		DeviceID           string `gorm:"index;type:varchar(191);comment:璁惧ID" json:"deviceId"`
-		ProcedureID        string `gorm:"index;type:varchar(191);comment:宸ュ簭ID" json:"procedureId"`
-		Channel            int32  `gorm:"index;comment:閫氶亾" json:"channel"`                //閫氶亾
-		ProcessModelNumber string `gorm:"index;comment:宸ヨ壓妯″瀷缂栧彿" json:"processModelNumber"` //宸ヨ壓妯″瀷缂栧彿
-		StartTime          int64  `gorm:"comment:璁″垝寮�濮嬫椂闂�" json:"startTime"`
-		EndTime            int64  `gorm:"comment:璁″垝缁撴潫鏃堕棿" json:"endTime"`
+		WorkOrderID        string `gorm:"index;type:varchar(191);not null" json:"-"`
+		OrderID            string `gorm:"index;type:varchar(191);not null" json:"-"`
+		DeviceID           string `gorm:"index;type:varchar(191)" json:"deviceId"`
+		ProcedureID        string `gorm:"index;type:varchar(191)" json:"procedureId"`
+		Channel            int32  `gorm:"index;" json:"channel"`            //閫氶亾
+		ProcessModelNumber string `gorm:"index;" json:"processModelNumber"` //宸ヨ壓妯″瀷缂栧彿
+		StartTime          int64  `json:"startTime"`
+		EndTime            int64  `json:"endTime"`
 		Status             ProcedureStatus
 		ProcedureData      string                  `json:"-"`                  //common.ProductProcedure  json涓�
 		ProceduresInfo     common.ProductProcedure `json:"procedure" gorm:"-"` //common.ProductProcedure  瀵硅薄
diff --git a/model/process_model.go b/model/process_model.go
index 1ab13a2..bedda26 100644
--- a/model/process_model.go
+++ b/model/process_model.go
@@ -12,14 +12,14 @@
 	// ProcessModel 宸ヨ壓鍙傛暟
 	ProcessModel struct {
 		gorm.Model   `json:"-"`
-		Number       string                 `gorm:"index;column:number;type:varchar(255);not null;default '';comment:宸ヨ壓妯″瀷缂栧彿" json:"number"` //宸ヨ壓妯″瀷缂栧彿
-		Product      string                 `gorm:"column:product;type:varchar(255);not null;default '';comment:浜у搧鍚嶇О" json:"product"`       //浜у搧鍚嶇О
-		Procedure    string                 `gorm:"column:procedure;type:varchar(255);not null;default '';comment:宸ュ簭" json:"procedure"`     //宸ュ簭
-		Params       string                 `gorm:"type:text;comment:宸ヨ壓鍙傛暟閿�煎json涓�"`
+		Number       string `gorm:"index;column:number;type:varchar(255);not null;default ''" json:"number"` //宸ヨ壓妯″瀷缂栧彿
+		Product      string `gorm:"column:product;type:varchar(255);not null;default ''" json:"product"`     //浜у搧鍚嶇О
+		Procedure    string `gorm:"column:procedure;type:varchar(255);not null;default ''" json:"procedure"` //宸ュ簭
+		Params       string
 		ParamsMap    map[string]interface{} `json:"paramsMap" gorm:"-"`
-		DeviceId     string                 `json:"deviceId" gorm:"-"`                    //鐢ㄤ簬杩囨护鑾峰彇nsq娑堟伅
-		IsNew        bool                   `json:"-" gorm:"column:is_new;comment:鏄惁鏈�鏂扮殑"` //鏄惁鏈�鏂扮殑
-		IsUpdate     bool                   `json:"isUpdate" gorm:"-"`                    //鍓嶇鐢�
+		DeviceId     string                 `json:"deviceId" gorm:"-"`      //鐢ㄤ簬杩囨护鑾峰彇nsq娑堟伅
+		IsNew        bool                   `json:"-" gorm:"column:is_new"` //鏄惁鏈�鏂扮殑
+		IsUpdate     bool                   `json:"isUpdate" gorm:"-"`      //鍓嶇鐢�
 		NewParamsMap map[string]interface{} `json:"newParamsMap" gorm:"-"`
 		NewNumber    string                 `json:"newNumber" gorm:"-"`
 	}
diff --git a/model/production_progress.go b/model/production_progress.go
index 3fdb02c..bbdeb98 100644
--- a/model/production_progress.go
+++ b/model/production_progress.go
@@ -9,13 +9,13 @@
 type (
 	ProductionProgress struct {
 		gorm.Model
-		WorkOrderID      string `gorm:"index;type:varchar(191);not null;comment:宸ュ崟ID" json:"workOrderID"`
-		OrderID          string `gorm:"index;type:varchar(191);not null;comment:璁㈠崟ID" json:"orderID"`
-		ProcedureID      string `gorm:"type:varchar(191);comment:宸ュ簭ID" json:"procedureId"`
-		DeviceID         string `gorm:"type:varchar(191);not null;comment:璁惧ID" json:"deviceId"`
-		FinishedQuantity int64  `gorm:"type:int;not null;comment:瀹屾垚鏁伴噺" json:"finishedQuantity"`
-		Channel          int32  `gorm:"type:int;comment:宸ヤ綔閫氶亾" json:"channel"` //閫氶亾
-		TotalQuantity    int64  `gorm:"type:int;not null;comment:鎬婚噺" json:"totalQuantity"`
+		WorkOrderID      string `gorm:"index;type:varchar(191);not null" json:"workOrderID"`
+		OrderID          string `gorm:"index;type:varchar(191);not null" json:"orderID"`
+		ProcedureID      string `gorm:"type:varchar(191)" json:"procedureId"`
+		DeviceID         string `gorm:"type:varchar(191);not null" json:"deviceId"`
+		FinishedQuantity int64  `gorm:"type:int;not null" json:"finishedQuantity"`
+		Channel          int32  `gorm:"type:int" json:"channel"` //閫氶亾
+		TotalQuantity    int64  `gorm:"type:int;not null" json:"totalQuantity"`
 	}
 
 	ProductionProgressSearch struct {
diff --git a/model/work_order.go b/model/work_order.go
index 8dc4507..b854461 100644
--- a/model/work_order.go
+++ b/model/work_order.go
@@ -10,18 +10,18 @@
 type (
 	Order struct {
 		gorm.Model
-		WorkOrderID string          `gorm:"index;type:varchar(191);not null;comment:'宸ュ崟ID'" json:"workOrderId"`
-		OrderID     string          `gorm:"index;type:varchar(191);not null;comment:'璁㈠崟ID'" json:"orderId"`
-		ProductID   string          `gorm:"type:varchar(191);comment:'浜у搧ID'" json:"productId"`
-		ProductName string          `gorm:"type:varchar(191);comment:'浜у搧鍚嶇О'" json:"productName"`
-		Parameter   string          `gorm:"type:varchar(1024);comment:'鍙傛暟闇�姹�'" json:"parameter"`
-		Customer    string          `gorm:"type:varchar(191);comment:'瀹㈡埛缂栫爜'" json:"customer"`
-		DeliverDate string          `gorm:"type:varchar(100);comment:'浜よ揣鏃ユ湡'" json:"deliverDate"`
+		WorkOrderID string          `gorm:"index;type:varchar(191);not null" json:"workOrderId"`
+		OrderID     string          `gorm:"index;type:varchar(191);not null" json:"orderId"`
+		ProductID   string          `gorm:"type:varchar(191)" json:"productId"`
+		ProductName string          `gorm:"type:varchar(191)" json:"productName"`
+		Parameter   string          `gorm:"type:varchar(1024)" json:"parameter"`
+		Customer    string          `gorm:"type:varchar(191)" json:"customer"`
+		DeliverDate string          `gorm:"type:varchar(100)" json:"deliverDate"`
 		OrderAttr   string          `json:"orderAttr"` // 璁㈠崟灞炴�ф嫾鎺ョ殑瀛楃涓诧紝鍗宠揣鐗╂弿杩�
-		Amount      decimal.Decimal `gorm:"type:decimal(35,18);comment:'鏁伴噺'" json:"amount"`
-		Unit        string          `gorm:"type:varchar(100);comment:'鍗曚綅'" json:"unit"`
-		StartTime   int64           `gorm:"comment:'璁″垝寮�濮嬫椂闂�'" json:"startTime"`
-		EndTime     int64           `gorm:"comment:'璁″垝缁撴潫鏃堕棿'" json:"endTime"`
+		Amount      decimal.Decimal `gorm:"type:decimal(35,18)" json:"amount"`
+		Unit        string          `gorm:"type:varchar(100)" json:"unit"`
+		StartTime   int64           `json:"startTime"`
+		EndTime     int64           `json:"endTime"`
 		Status      OrderStatus
 	}
 

--
Gitblit v1.8.0