From 28240d14942e63d05c06531f04f7f7b5530f04c3 Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期三, 20 九月 2023 10:46:32 +0800
Subject: [PATCH] 产品与产品类型注释添加

---
 models/material.go |   81 ++++++++++++++++++++--------------------
 1 files changed, 40 insertions(+), 41 deletions(-)

diff --git a/models/material.go b/models/material.go
index 26bd05e..5d616be 100644
--- a/models/material.go
+++ b/models/material.go
@@ -12,61 +12,60 @@
 	// Material 鐗╂枡
 	Material struct {
 		BaseModelString
-		Name string `gorm:"unique;type:varchar(191);not null;comment:鐗╂枡鍚嶇О" json:"name"`
+		Name string `gorm:"unique;type:varchar(191);not null;comment:鐗╂枡鍚嶇О" json:"name"` //鐗╂枡鍚嶇О
 		//MaterialType constvar.ProductType  `gorm:"index;type:int(11);comment:鐗╂枡绫诲瀷(鏁板瓧)" json:"materialType"`
-		Model constvar.MaterialMode `gorm:"type:varchar(191);not null;comment:鐗╂枡绫诲瀷(瀛楃涓�)" json:"model"`
+		Model constvar.MaterialMode `gorm:"type:varchar(191);not null;comment:鐗╂枡绫诲瀷(瀛楃涓�)" json:"model"` //鐗╂枡绫诲瀷(瀛楃涓�)
 		//Explain           string                  `gorm:"type:varchar(512);comment:缂栧彿璇存槑" json:"explain"`
 		//CodeStandardID    string                  `gorm:"type:varchar(191);comment:缂栫爜瑙勮寖ID" json:"codeStandardID"`
 		//Specs             string                  `gorm:"type:varchar(191);comment:鐗╂枡瑙勬牸" json:"specs"`
 		//Type              string                  `gorm:"type:varchar(191);comment:鐗╂枡鍨嬪彿" json:"type"`
-		MinInventory decimal.Decimal `gorm:"type:decimal(35,18);comment:鏈�灏忓簱瀛�" json:"minInventory"`
-		MaxInventory decimal.Decimal `gorm:"type:decimal(35,18);comment:鏈�澶у簱瀛�" json:"maxInventory"`
-		Amount       decimal.Decimal `gorm:"type:decimal(35,18);comment:鏁伴噺" json:"amount"`
+		MinInventory decimal.Decimal `gorm:"type:decimal(35,18);comment:鏈�灏忓簱瀛�" json:"minInventory"` //鏈�灏忓簱瀛�
+		MaxInventory decimal.Decimal `gorm:"type:decimal(35,18);comment:鏈�澶у簱瀛�" json:"maxInventory"` //鏈�澶у簱瀛�
+		Amount       decimal.Decimal `gorm:"type:decimal(35,18);comment:鏁伴噺" json:"amount"`         //鏁伴噺
 		//LockAmount        decimal.Decimal         `gorm:"type:decimal(35,18);default:0;comment:閿佸畾鏁伴噺" json:"lockAmount"`
-		Unit string `gorm:"type:varchar(100);comment:鍗曚綅" json:"unit"`
+		Unit string `gorm:"type:varchar(100);comment:鍗曚綅" json:"unit"` //鍗曚綅
 		//Note              string                  `gorm:"type:varchar(1024);comment:澶囨敞" json:"note"`
-		TemplateID string `gorm:"type:varchar(191);comment:妯℃澘ID" json:"-"`
+		TemplateID string `gorm:"type:varchar(191);comment:妯℃澘ID" json:"templateID"` //妯℃澘ID
 		//FSource           string                  `gorm:"type:varchar(191);comment:鐢熶骇杞﹂棿" json:"-"`
 		//Status            constvar.MaterialStatus `gorm:"type:int(11);comment:鐘舵��" json:"status"`
-		Supplier      string          `gorm:"type:varchar(191);comment:渚涘簲鍟�" json:"supplier"`
-		PurchasePrice decimal.Decimal `gorm:"type:decimal(35,18);comment:閲囪喘浠锋牸" json:"purchasePrice"`
+		Supplier      string          `gorm:"type:varchar(191);comment:渚涘簲鍟�" json:"supplier"`         //渚涘簲鍟�
+		PurchasePrice decimal.Decimal `gorm:"type:decimal(35,18);comment:閲囪喘浠锋牸" json:"purchasePrice"` //閲囪喘浠锋牸
 		//PurchaseAheadDay  int                     `gorm:"type:int(11);comment:閲囪喘鎻愬墠鏈�(澶�)" json:"purchaseAheadDay"`
 		//ProduceAheadDay   int                     `gorm:"type:int(11);comment:鍒堕�犳彁鍓嶆湡(澶�)" json:"produceAheadDay"`
-		MinPurchaseAmount decimal.Decimal `gorm:"type:decimal(35,18);comment:鏈�灏忛噰璐噺" json:"minPurchaseAmount"`
+		MinPurchaseAmount decimal.Decimal `gorm:"type:decimal(35,18);comment:鏈�灏忛噰璐噺" json:"minPurchaseAmount"` //鏈�灏忛噰璐噺
 		//PurchaseType      constvar.PurchaseType `gorm:"type:int(11);comment:閲囪喘绫诲瀷" json:"purchaseType"`
-		IsSale    bool            `gorm:"type:tinyint(1);comment:鏄惁閿�鍞�" json:"isSale"`
-		SalePrice decimal.Decimal `gorm:"type:decimal(35,18);comment:閿�鍞崟浠�" json:"salePrice"`
+		IsSale    bool            `gorm:"type:tinyint(1);comment:鏄惁閿�鍞�" json:"isSale"`        //鏄惁閿�鍞�
+		SalePrice decimal.Decimal `gorm:"type:decimal(35,18);comment:閿�鍞崟浠�" json:"salePrice"` //閿�鍞崟浠�
 		AutoIncr  uint            `gorm:"type:int(11);comment:鑷ID;default:0;" json:"-"`
 		//wms娣诲姞瀛楁
-		InvoicingStrategy       constvar.InvoicingStrategy `gorm:"type:int(11);comment:寮�绁ㄧ瓥鐣�" json:"invoicingStrategy"`
-		OrderCreation           constvar.OrderCreation     `gorm:"type:int(11);comment:璁㈠崟鍒涘缓" json:"orderCreation"`
-		CustomerTaxes           decimal.Decimal            `gorm:"type:decimal(20,2);comment:瀹㈡埛绋�" json:"customerTaxes"`     //瀹㈡埛绋庣櫨鍒嗘瘮
-		Cost                    decimal.Decimal            `gorm:"type:decimal(20,2);comment:鎴愭湰" json:"cost"`               //鎴愭湰
-		CategoryId              int                        `gorm:"type:int(11);comment:浜у搧绫诲埆id" json:"categoryId"`           //浜у搧绫诲埆id
-		InternalReference       string                     `gorm:"type:varchar(255);comment:鍐呴儴鍙傝��" json:"internalReference"` //鍐呴儴鍙傝��
-		Barcode                 string                     `gorm:"type:varchar(255);comment:鏉$爜" json:"barcode"`             //鏉$爜
-		ProductTagId            int                        `gorm:"type:int(11);comment:浜у搧鏍囩id" json:"productTagId"`         //浜у搧鏍囩
-		ProductTagName          string                     `gorm:"type:varchar(255);comment:浜у搧鏍囩鍚嶇О" json:"productTagName"`
-		CompanyId               int                        `gorm:"type:int(11);comment:鍏徃id" json:"companyId"`
-		CompanyName             string                     `gorm:"type:varchar(255);comment:鍏徃鍚嶇О" json:"companyName"`
-		InternalNotes           string                     `gorm:"type:varchar(512);comment:鍐呴儴璇存槑" json:"internalNotes"` //鍐呴儴璇存槑
-		SelectProduct           int                        `gorm:"type:int(11);comment:鍙�変骇鍝乮d" json:"selectProduct"`
-		SellExplain             string                     `gorm:"type:varchar(512);comment:閿�鍞鏄�" json:"sellExplain"`
-		CanBePurchased          bool                       `gorm:"type:int(11);comment:鏄惁鍙噰璐�" json:"canBePurchased"` //鏄惁鍙噰璐�
-		CurrencyName            string                     `gorm:"type:varchar(255);comment:甯佺鍚嶇О" json:"currencyName"`
-		DeliveryAdvanceTime     int                        `gorm:"type:int(11);comment:浜よ揣鎻愬墠鏃堕棿(澶�)" json:"deliveryAdvanceTime"`
-		ControlStrategy         constvar.InvoicingStrategy `gorm:"type:int(11);comment:鎺у埗绛栫暐" json:"controlStrategy"`
-		BuyExplain              string                     `gorm:"type:varchar(512);comment:閲囪喘璇存槑" json:"buyExplain"`
-		Principal               string                     `gorm:"type:varchar(255);comment:璐熻矗浜�" json:"principal"` //璐熻矗浜�
-		Weight                  decimal.Decimal            `gorm:"type:decimal(20,2);comment:閲嶉噺" json:"weight"`    //閲嶉噺
-		Volume                  decimal.Decimal            `gorm:"type:decimal(20,2);comment:浣撶Н" json:"volume"`    //浣撶Н
-		HSCode                  string                     `gorm:"type:varchar(255);comment:HS缂栫爜" json:"HSCode"`
-		OriginCountryId         int                        `gorm:"type:int(11);comment:鍘熶骇鍦癷d" json:"originCountryId"`
-		OriginCountryName       string                     `gorm:"type:varchar(255);comment:鍘熶骇鍦板悕绉�" json:"originCountryName"`
-		InStorageExplain        string                     `gorm:"type:varchar(512);comment:鍏ュ簱璇存槑" json:"inStorageExplain"`
-		OutStorageExplain       string                     `gorm:"type:varchar(512);comment:鍑哄簱璇存槑" json:"outStorageExplain"`
-		InternalTransferExplain string                     `gorm:"type:varchar(512);comment:鍐呴儴璋冩嫧璇存槑" json:"internalTransferExplain"`
-		//CompanyArr              []IdAndName                `gorm:"-" json:"companyArr"`
+		InvoicingStrategy       constvar.InvoicingStrategy `gorm:"type:int(11);comment:寮�绁ㄧ瓥鐣�" json:"invoicingStrategy"`              //寮�绁ㄧ瓥鐣�
+		OrderCreation           constvar.OrderCreation     `gorm:"type:int(11);comment:璁㈠崟鍒涘缓" json:"orderCreation"`                  //璁㈠崟鍒涘缓
+		CustomerTaxes           decimal.Decimal            `gorm:"type:decimal(20,2);comment:瀹㈡埛绋�" json:"customerTaxes"`             //瀹㈡埛绋庣櫨鍒嗘瘮
+		Cost                    decimal.Decimal            `gorm:"type:decimal(20,2);comment:鎴愭湰" json:"cost"`                       //鎴愭湰
+		CategoryId              int                        `gorm:"type:int(11);comment:浜у搧绫诲埆id" json:"categoryId"`                   //浜у搧绫诲埆id
+		InternalReference       string                     `gorm:"type:varchar(255);comment:鍐呴儴鍙傝��" json:"internalReference"`         //鍐呴儴鍙傝��
+		Barcode                 string                     `gorm:"type:varchar(255);comment:鏉$爜" json:"barcode"`                     //鏉$爜
+		ProductTagId            int                        `gorm:"type:int(11);comment:浜у搧鏍囩id" json:"productTagId"`                 //浜у搧鏍囩id
+		ProductTagName          string                     `gorm:"type:varchar(255);comment:浜у搧鏍囩鍚嶇О" json:"productTagName"`          //浜у搧鏍囩鍚嶇О
+		CompanyId               int                        `gorm:"type:int(11);comment:鍏徃id" json:"companyId"`                      //鍏徃id
+		CompanyName             string                     `gorm:"type:varchar(255);comment:鍏徃鍚嶇О" json:"companyName"`               //鍏徃鍚嶇О
+		InternalNotes           string                     `gorm:"type:varchar(512);comment:鍐呴儴璇存槑" json:"internalNotes"`             //鍐呴儴璇存槑
+		SelectProduct           int                        `gorm:"type:int(11);comment:鍙�変骇鍝乮d" json:"selectProduct"`                //鍙�変骇鍝乮d
+		SellExplain             string                     `gorm:"type:varchar(512);comment:閿�鍞鏄�" json:"sellExplain"`               //閿�鍞鏄�
+		CanBePurchased          bool                       `gorm:"type:int(11);comment:鏄惁鍙噰璐�" json:"canBePurchased"`                //鏄惁鍙噰璐�
+		CurrencyName            string                     `gorm:"type:varchar(255);comment:甯佺鍚嶇О" json:"currencyName"`              //甯佺鍚嶇О
+		DeliveryAdvanceTime     int                        `gorm:"type:int(11);comment:浜よ揣鎻愬墠鏃堕棿(澶�)" json:"deliveryAdvanceTime"`       //浜よ揣鎻愬墠鏃堕棿(澶�)
+		ControlStrategy         constvar.InvoicingStrategy `gorm:"type:int(11);comment:鎺у埗绛栫暐" json:"controlStrategy"`                //鎺у埗绛栫暐
+		BuyExplain              string                     `gorm:"type:varchar(512);comment:閲囪喘璇存槑" json:"buyExplain"`                //閲囪喘璇存槑
+		Principal               string                     `gorm:"type:varchar(255);comment:璐熻矗浜�" json:"principal"`                  //璐熻矗浜�
+		Weight                  decimal.Decimal            `gorm:"type:decimal(20,2);comment:閲嶉噺" json:"weight"`                     //閲嶉噺
+		Volume                  decimal.Decimal            `gorm:"type:decimal(20,2);comment:浣撶Н" json:"volume"`                     //浣撶Н
+		HSCode                  string                     `gorm:"type:varchar(255);comment:HS缂栫爜" json:"HSCode"`                    //HS缂栫爜
+		OriginCountryId         int                        `gorm:"type:int(11);comment:鍘熶骇鍦癷d" json:"originCountryId"`               //鍘熶骇鍦癷d
+		OriginCountryName       string                     `gorm:"type:varchar(255);comment:鍘熶骇鍦板悕绉�" json:"originCountryName"`        //鍘熶骇鍦板悕绉�
+		InStorageExplain        string                     `gorm:"type:varchar(512);comment:鍏ュ簱璇存槑" json:"inStorageExplain"`          //鍏ュ簱璇存槑
+		OutStorageExplain       string                     `gorm:"type:varchar(512);comment:鍑哄簱璇存槑" json:"outStorageExplain"`         //鍑哄簱璇存槑
+		InternalTransferExplain string                     `gorm:"type:varchar(512);comment:鍐呴儴璋冩嫧璇存槑" json:"internalTransferExplain"` //鍐呴儴璋冩嫧璇存槑
 	}
 
 	MaterialSearch struct {

--
Gitblit v1.8.0