models/operation.go
@@ -45,6 +45,8 @@ LocationID int `json:"locationID" gorm:"type:int;not null;comment:源位置id"` //源位置id 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 {