models/operation.go
@@ -44,7 +44,7 @@ ReceiverAddr string `json:"receiverAddr" gorm:"type:varchar(255);comment:收货地址"` LocationID int `json:"locationID" gorm:"type:int;not null;comment:源位置id"` //源位置id Location Location `json:"location" gorm:"foreignkey:locationID;references:Id"` //源位置 Location Location `json:"location" gorm:"foreignkey:LocationID;references:Id"` //源位置 } OperationSearch struct {