'decimal:3', 'units_qty' => 'decimal:3', 'qty_base' => 'decimal:3', 'moved_at' => 'datetime', ]; /** * Get the product being moved. */ public function product(): BelongsTo { return $this->belongsTo(Product::class); } /** * Get the source warehouse. */ public function fromWarehouse(): BelongsTo { return $this->belongsTo(Warehouse::class, 'from_warehouse_id'); } /** * Get the destination warehouse. */ public function toWarehouse(): BelongsTo { return $this->belongsTo(Warehouse::class, 'to_warehouse_id'); } /** * Get the packaging used for this move. */ public function packaging(): BelongsTo { return $this->belongsTo(ProductPackaging::class, 'packaging_id'); } }