<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class MaterialRequisitionSea extends Model
{

    protected $table = 'material_requisition_sea';
    
    protected $fillable = [
        'contract_sea_id','flag_contract','request_no','entered_by','customer_id','request_date','status','approved_date','recieved_date','pr_status','location_id'
    ];

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

    public function customer()
    {
    	return $this->belongsTo('App\Customer','customer_id');
    }

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

    public function location()
    {
        return $this->belongsTo('App\Location','location_id');
    }

}
