<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class PRproduct extends Model
{
    protected $table = 'pr_products';
    
    protected $fillable = [
        'purchase_request_id','product_id','qty','apr_qty','unit_id','grade_id','status'
    ];

   public $timestamps = false;
   
    public function purchaseRequest()
    {
    	return $this->belongsTo('App\PurchaseRequest','purchase_request_id');
    }

    public function product()
    {
    	return $this->belongsTo('App\Product','product_id');
    }

    public function unit()
    {
    	return $this->belongsTo('App\UnitMeasurement','unit_id');
    }

    public function grade()
    {
    	return $this->belongsTo('App\GradeMaster','grade_id');
    }

}
