<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class UnitMeasurement extends Model
{
    protected $table = 'unit_of_measurement';
    
    protected $fillable = [
        'unit','unit_code'
    ];

    public $timestamps = false;

    public function productUnits()
    {
    	return $this->hasMany('App\ProductUnit','unit_id');
    }

    public function mrApproval()
    {
        return $this->hasMany('App\MRapprovalproduct','unit_id');
    }

    public function productNotification()
    {
    	return $this->hasMany('App\ProductNotification','unit_id');
    }

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

    public function supplierRate()
    {
    	return $this->hasMany('App\SupplierRateEntry');
    }
}
