*/ use HasFactory; protected $fillable = [ 'production_order_id', 'inventory_id', 'quantity_used', 'unit_id', ]; protected $casts = [ 'quantity_used' => 'decimal:4', ]; public function inventory() { return $this->belongsTo(\App\Modules\Inventory\Models\Inventory::class); } public function unit() { return $this->belongsTo(\App\Modules\Inventory\Models\Unit::class); } public function productionOrder(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(ProductionOrder::class); } public function product(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Product::class); } }