<?php namespace App;

use Illuminate\Database\Eloquent\Model;

class Transaction extends Model
{

	protected $fillable
		= [
			'product_id',
			'user_id',
			'transport_id',
			'transport_cost',
			'amount',
			'sum',
			'money_paid',
			'delivered',
			'received'
		];

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

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

	public function transport(){
		return $this->belongsTo('App\Transport');
	}

}
