<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use App\OrderProduct;
use App\Status;
use App\User;

class OrderDelivery extends Model
{
    Protected $fillable = ['order_id','employee_id','jobstatus','dateTime','isCompleted','completingperiod'];

    


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

    public function order_products(){
        return $this->hasMany('App\OrderProduct', 'order_id', 'order_id');
    }

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

}
