<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class PurchaseItem extends Model
{
    use HasFactory;
    public function item()
    {
        return $this->belongsTo('App\Models\Item', 'item_id');

    }

    public function itemWithSerialNumber()
    {
        return $this->belongsTo('App\Models\Item', 'item_id')->where('serial_number',"enable");
    }

}
