From 72b40b4f187c5ddcfcc48d85e68142b0fe4f1c21 Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期二, 19 九月 2023 15:50:03 +0800 Subject: [PATCH] 产品分类表字段修改 --- models/operation.go | 35 +++++++++++++++++++++-------------- 1 files changed, 21 insertions(+), 14 deletions(-) diff --git a/models/operation.go b/models/operation.go index b1b3355..5fa92ad 100644 --- a/models/operation.go +++ b/models/operation.go @@ -11,19 +11,26 @@ // Operation 鎿嶄綔琛� Operation struct { WmsModel - Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"` - Number string `json:"number" gorm:"column:number;type:varchar(255)"` //鍗曞彿 - SourceNumber string `json:"sourceNumber" gorm:"type:varchar(255)"` //婧愬崟鍙� - - BaseOperationType constvar.BaseOperationType `json:"baseOperationType" gorm:"type:tinyint;not null;comment:鍩虹浣滀笟绫诲瀷"` //鍩虹浣滀笟绫诲瀷 - OperationTypeId int `json:"operationTypeId" gorm:"type:int;not null;comment:浣滀笟绫诲瀷id"` //浣滀笟绫诲瀷id - Status int `json:"status" gorm:"type:tinyint;not null;comment:鐘舵��"` //鐘舵�� - - FromLocationId int `json:"fromLocationId" gorm:"type:int;not null;comment:婧愪綅缃甶d"` //婧愪綅缃甶d - FromLocation Location `json:"fromLocation" gorm:"foreignKey:FromLocationId"` //婧愪綅缃� - ToLocationId int `json:"toLocationId" gorm:"type:int;not null;comment:鐩爣浣嶇疆id"` //鐩爣浣嶇疆id - ToLocation Location `json:"toLocation" gorm:"foreignKey:ToLocationId"` //鐩爣浣嶇疆 - + Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"` + Number string `json:"number" gorm:"column:number;type:varchar(255)"` //鍗曞彿 + SourceNumber string `json:"sourceNumber" gorm:"type:varchar(255)"` //婧愬崟鍙� + OperationTypeId int `json:"operationTypeId" gorm:"type:int;not null;comment:浣滀笟绫诲瀷id"` //浣滀笟绫诲瀷id + Status constvar.OperationStatus `json:"status" gorm:"type:int(11);not null;comment:鐘舵��"` //鐘舵�� + FromLocationId int `json:"fromLocationId" gorm:"type:int;not null;comment:婧愪綅缃甶d"` //婧愪綅缃甶d + FromLocation Location `json:"fromLocation" gorm:"foreignKey:FromLocationId"` //婧愪綅缃� + ToLocationId int `json:"toLocationId" gorm:"type:int;not null;comment:鐩爣浣嶇疆id"` //鐩爣浣嶇疆id + ToLocation Location `json:"toLocation" gorm:"foreignKey:ToLocationId"` //鐩爣浣嶇疆 + OperationDate string `json:"operationDate" gorm:"type:varchar(31);comment:瀹夋帓鏃ユ湡"` + CarrierID int `json:"carrierID" gorm:"type:int;comment:鎵胯繍鍟咺D"` + CarrierName string `json:"carrierName" gorm:"type:varchar(63);comment:鎵胯繍鍟嗗悕绉�"` + Tracking string `json:"tracking" gorm:"type:varchar(127);comment:杩借釜鍙傝��"` + ContacterID int `json:"contacterID" gorm:"type:int;comment:鑱旂郴浜篒D"` + ContacterName string `json:"contacterName" gorm:"type:varchar(63);comment:鑱旂郴浜哄鍚�"` + Weight float64 `json:"weight" gorm:"type:decimal;comment:閲嶉噺(kg)"` + TransferWeight float64 `json:"transferWeight" gorm:"type:decimal;comment:鐗╂祦閲嶉噺(kg)"` + CompanyID int `json:"companyID" gorm:"type:int;comment:鍏徃ID"` + CompanyName string `json:"companyName" gorm:"type:varchar(127);comment:鍏徃鍚嶇О(kg)"` + Details []*OperationDetails `json:"details"` } OperationSearch struct { @@ -38,7 +45,7 @@ ) func (slf *Operation) TableName() string { - return "operation" + return "wms_operation" } func NewOperationSearch() *OperationSearch { -- Gitblit v1.8.0