<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class PurchaseRequest extends Model
{

    protected $table = 'purchase_request';
    
    protected $fillable = [
        'request_no','request_date','mr_date','status','entered_by','cus_group_id'
    ];

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

    public function enteredBy()
    {
    	return $this->belongsTo('App\User','entered_by');
    }

    public function customer_group()
    {
        return $this->belongsTo('App\CustomerType','cus_group_id');
    }
  
}
