<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class MasterFormulationItem extends Model
{
    //

    use SoftDeletes;
    protected $fillable = [
        'master_formulation_id',
        'raw_material_item_id',
        'quantity',
    ];

    public function masterFormulation()
    {
        return $this->belongsTo(MasterFormulation::class, 'master_formulation_id');
    }


    public function rawItem()
    {
        return $this->belongsTo(RawMaterialItem::class, 'raw_material_item_id');
    }
}
