From 318c49da20ec30c4f85ef35e479499e82a841b25 Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期一, 11 三月 2024 14:18:13 +0800 Subject: [PATCH] swag提交 --- models/move_history.go | 32 +++++++++++++++++--------------- 1 files changed, 17 insertions(+), 15 deletions(-) diff --git a/models/move_history.go b/models/move_history.go index f4c8b7d..ef75cbd 100644 --- a/models/move_history.go +++ b/models/move_history.go @@ -2,7 +2,7 @@ import ( "fmt" - "google.golang.org/genproto/googleapis/type/decimal" + "github.com/shopspring/decimal" "gorm.io/gorm" "wms/constvar" "wms/pkg/mysqlx" @@ -13,19 +13,21 @@ MoveHistory struct { WmsModel Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"` - Number string `json:"number" gorm:"column:number;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 - OperationId int `json:"operationRecordId" gorm:"type:int;not null;comment:鎿嶄綔id"` //鎿嶄綔id - - ProductId int `json:"productId" gorm:"type:int;not null;comment:浜у搧id"` //浜у搧id - ProductName string `json:"productName" gorm:"type:varchar(255);not null;comment:浜у搧鍚嶇О"` //浜у搧鍚嶇О - Quantity decimal.Decimal `json:"quantity" gorm:"type:decimal(20,2);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"` //鐩爣浣嶇疆 + Number string `json:"number" gorm:"column:number;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 + OperationTypeName string `json:"operationTypeName" gorm:"type:varchar(127);not null;comment:浣滀笟绫诲瀷鍚嶇О"` //浣滀笟绫诲瀷鍚嶇О + OperationId int `json:"operationId" gorm:"type:int;not null;comment:鎿嶄綔id"` //鎿嶄綔id + ProductId string `json:"productId" gorm:"type:varchar(255);not null;comment:浜у搧id"` //浜у搧id + ProductName string `json:"productName" gorm:"type:varchar(255);not null;comment:浜у搧鍚嶇О"` //浜у搧鍚嶇О + Amount decimal.Decimal `json:"amount" gorm:"type:decimal(20,2);not null;comment:鏁伴噺"` //鏁伴噺 + Unit string `json:"unit" gorm:"type:char(10);not null;comment:鍗曚綅"` //鍗曚綅 + Weight decimal.Decimal `json:"weight" gorm:"type:decimal(20,2);not null;comment:閲嶉噺"` //閲嶉噺 + FromLocationId int `json:"fromLocationId" gorm:"type:int;not null;comment:婧愪綅缃甶d"` //婧愪綅缃甶d + FromLocation string `json:"fromLocation" gorm:"type:varchar(255);not null;comment:婧愪綅缃�"` //婧愪綅缃� + ToLocationId int `json:"toLocationId" gorm:"type:int;not null;comment:鐩爣浣嶇疆id"` //鐩爣浣嶇疆id + ToLocation string `json:"toLocation" gorm:"type:varchar(255);not null;comment:鐩爣浣嶇疆"` //鐩爣浣嶇疆 + Operator string `json:"operator" gorm:"type:varchar(255);not null;comment:鎿嶄綔鑰�"` //鎿嶄綔鑰� } MoveHistorySearch struct { @@ -40,7 +42,7 @@ ) func (slf *MoveHistory) TableName() string { - return "move_history" + return "wms_move_history" } func NewMoveHistorySearch() *MoveHistorySearch { -- Gitblit v1.8.0