liujiandao
2023-09-27 5c1dfdd9f0d51821ac47a46cba74ef94bfe0141e
models/location_product_amount.go
@@ -14,6 +14,7 @@
      LocationProductId int             `json:"locationProductId" gorm:"type:int;not null;comment:上架规则id"` //上架规则id
      LocationProduct   LocationProduct `json:"locationProduct" gorm:"foreignKey:LocationProductId;references:Id"`
      Amount            decimal.Decimal `json:"amount" gorm:"type:decimal(20,2);not null;comment:库存数量"` //库存数量
      CreateDate        string          `json:"createDate" gorm:"type:varchar(63);comment:日期"`          //日期
   }
   LocationProductAmountSearch struct {
@@ -27,9 +28,17 @@
   }
   LocationProductAmountWithOperation struct {
      LocationProductAmount LocationProductAmount `json:"locationProductAmount"`
      AdjustAmount          decimal.Decimal       `json:"adjustAmount" gorm:"column:adjust_amount"`
      DifferenceAmount      decimal.Decimal       `json:"difference_amount"`
      //LocationProductAmount LocationProductAmount `json:"locationProductAmount"`
      LocationId       int             `json:"locationId" gorm:"column:location_id"`
      LocationName     string          `json:"locationName" gorm:"column:location_name"`
      ProductId        string          `json:"productId" gorm:"column:product_id"`
      ProductName      string          `json:"productName" gorm:"column:product_name"`
      Amount           decimal.Decimal `json:"amount" gorm:"column:amount"`
      Unit             string          `json:"unit" gorm:"column:unit"`
      CreateDate       string          `json:"createDate" gorm:"column:create_date"`
      AdjustAmount     decimal.Decimal `json:"adjustAmount" gorm:"column:adjust_amount"`
      DifferenceAmount decimal.Decimal `json:"differenceAmount" gorm:"-"`
      OperationId      int             `json:"operationId" gorm:"column:operation_id"`
   }
)