<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class ConsignmentProductSea extends Model
{
    protected $table = 'consignment_products_sea';
    
    protected $fillable = [
        'po_sea_id','po_products_sea_id','po_sea_consignments_id','product_id','tot_qty','supplied_qty','unit_id','grade_id'
    ];

   public $timestamps = false;
   
    public function poSea()
    {
    	return $this->belongsTo('App\POSea','po_sea_id');
    }

    public function poSeapdt()
    {
        return $this->belongsTo('App\POSeaProducts','po_products_sea_id');
    }

    public function consignment()
    {
    	return $this->belongsTo('App\POSeaconsignment','po_sea_consignments_id');
    }

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

    public function unit()
    {
        return $this->belongsTo('App\UnitMeasurement','unit_id');
    }

    public function grade()
    {
        return $this->belongsTo('App\GradeMaster','grade_id');
    }

}
