zhangqian
2024-01-12 a10d59528a36dc5a1fbe4d9caa6b4abf25ab828c
models/operation_details.go
@@ -18,6 +18,11 @@
      Amount decimal.Decimal `json:"amount" gorm:"type:decimal(20,2);not null;comment:数量"` //数量
      //Unit        string          `json:"unit" gorm:"type:varchar(31);comment:单位"`                    //单位
      Product Material `json:"product" gorm:"foreignKey:ProductId;references:ID"`
      FromLocationID int      `json:"fromLocationId"   gorm:"type:int;not null;comment:源位置id"`         //源位置id
      FromLocation   Location `json:"fromLocation"     gorm:"foreignKey:FromLocationID;references:Id"` //源位置
      ToLocationID   int      `json:"toLocationId"    gorm:"type:int;not null;comment:目标位置id"`         //目标位置id
      ToLocation     Location `json:"toLocation"      gorm:"foreignKey:ToLocationID;references:Id"`    //目标位置
   }
   OperationDetailsSearch struct {