From e9439d34d4fad9a4133f573d4bd5f84d441300b7 Mon Sep 17 00:00:00 2001
From: jiangshuai <291802688@qq.com>
Date: 星期五, 05 一月 2024 17:19:49 +0800
Subject: [PATCH] 调拨增加仓库位置

---
 models/operation.go  |    6 ++++--
 request/operation.go |    6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/models/operation.go b/models/operation.go
index e9a7f1b..f7c37be 100644
--- a/models/operation.go
+++ b/models/operation.go
@@ -43,8 +43,10 @@
 		ReceiverPhone string `json:"receiverPhone" gorm:"type:varchar(31);comment:鑱旂郴鐢佃瘽"`
 		ReceiverAddr  string `json:"receiverAddr" gorm:"type:varchar(255);comment:鏀惰揣鍦板潃"`
 
-		LocationID int      `json:"locationID"   gorm:"type:int;not null;comment:婧愪綅缃甶d"` //婧愪綅缃甶d
-		Location   Location `json:"location" gorm:"foreignkey:LocationID;references:Id"` //婧愪綅缃�
+		LocationID   int      `json:"locationID"   gorm:"type:int;not null;comment:婧愪綅缃甶d"`          //婧愪綅缃甶d
+		Location     Location `json:"location" gorm:"foreignkey:LocationID;references:Id"`          //婧愪綅缃�
+		ToLocationID int      `json:"toLocationId"    gorm:"type:int;not null;comment:浠撳簱浣嶇疆id"`      //鐩爣浣嶇疆id
+		ToLocation   Location `json:"toLocation"      gorm:"foreignKey:ToLocationID;references:Id"` //鐩爣浣嶇疆
 	}
 
 	OperationSearch struct {
diff --git a/request/operation.go b/request/operation.go
index 313767b..dc95942 100644
--- a/request/operation.go
+++ b/request/operation.go
@@ -28,7 +28,8 @@
 	ReceiverName      string              `json:"receiverName" gorm:"type:varchar(31);comment:鏀惰揣浜哄鍚�"`
 	ReceiverPhone     string              `json:"receiverPhone" gorm:"type:varchar(31);comment:鑱旂郴鐢佃瘽"`
 	ReceiverAddr      string              `json:"receiverAddr" gorm:"type:varchar(255);comment:鏀惰揣鍦板潃"`
-	LocationId        int                 `json:"locationId"   gorm:"type:int;not null;comment:婧愪綅缃甶d"` //婧愪綅缃甶d
+	LocationId        int                 `json:"locationId"   gorm:"type:int;not null;comment:婧愪綅缃甶d"`     //婧愪綅缃甶d
+	ToLocationId      int                 `json:"toLocationId"    gorm:"type:int;not null;comment:浠撳簱浣嶇疆id"` //鐩爣浣嶇疆id
 }
 
 type OperationDetails struct {
@@ -73,7 +74,8 @@
 	ReceiverName      string                     `json:"receiverName" gorm:"type:varchar(31);comment:鏀惰揣浜哄鍚�"`
 	ReceiverPhone     string                     `json:"receiverPhone" gorm:"type:varchar(31);comment:鑱旂郴鐢佃瘽"`
 	ReceiverAddr      string                     `json:"receiverAddr" gorm:"type:varchar(255);comment:鏀惰揣鍦板潃"`
-	LocationId        int                        `json:"locationId"   gorm:"type:int;not null;comment:婧愪綅缃甶d"` //婧愪綅缃甶d
+	LocationId        int                        `json:"locationId"   gorm:"type:int;not null;comment:婧愪綅缃甶d"`     //婧愪綅缃甶d
+	ToLocationId      int                        `json:"toLocationId"    gorm:"type:int;not null;comment:浠撳簱浣嶇疆id"` //鐩爣浣嶇疆id
 }
 
 type OperationAllList struct {

--
Gitblit v1.8.0