<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class GrnItemBatch extends Model
{
    protected $fillable = [
        'grn_id',
        'grn_item_id',
        'batch',
        'mfg_date',
        'exp_date',
        'unit_price',
        'unit',
        'total_amount',
        'receiving_quantity',
        'supplier_bill_no',
        'sir_issued_qty',
    ];

    public function grn()
    {
        return $this->belongsTo(GoodsReceiving::class, 'grn_id');
    }

    public function grnItem()
    {
        return $this->belongsTo(GoodsReceivingItem::class, 'grn_item_id');
    }
}
