<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class PO extends Model
{
    protected $table = 'po';
    
    public $timestamps = false;
    protected $fillable = [
        'pr_id','po_no','supplier_id','entered_by','po_date','eta'
    ];

    public function pr()
    {
    	return $this->belongsTo('App\PurchaseRequest','pr_id');
    }

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

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