<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class PRSupplierProduct extends Model
{
    protected $table = 'pr_supplier_products';
    
    protected $fillable = [
        'pr_supplier_id','pr_product_id','product_id','qty','apr_qty','unit_id','grade_id','standard_id','unitprice','actual_unit','price','weight','status'
    ];

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

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

    public function supplier()
    {
    	return $this->belongsTo('App\Supplier','supplier_id');
    }

    public function prProduct()
    {
        return $this->belongsTo('App\PRproduct','pr_product_id');
    }

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

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

}
