<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class PRSupplierProductSea extends Model
{
    protected $table = 'pr_supplier_products_sea';
    
    protected $fillable = [
        'pr_supplier_sea_id','pr_product_sea_id','pr_products_schedule_sea_id','product_id','qty','apr_qty','unit_id','grade_id','standard_id','unitprice','actual_unit','price','weight','scheduled_date','schedule_id','status'
    ];

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

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

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

    public function prProductsea()
    {
        return $this->belongsTo('App\PRproductSea','pr_product_sea_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');
    }

}
