<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use App\Order;
use App\Product;

class OrderProduct extends Model
{
    Protected $fillable = ['order_id','product_id','quantity'];

    public function order(){
        return $this->belongsTo('App\Order','order_id','id');
    }

    public function status(){
        return $this->belongsTo('App\Status','status_id','id');
    }

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

    public function order_product_services(){
        return $this->hasMany('App\OrderProductService', 'orderproduct_id', 'id');
    }

}
