<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Review extends Model
{
    public $timestamps = true;
    protected $table = 'reviews';
    protected $fillable = [
       'client_id','invoice_id','reason','created_at','updated_at',
       'total_price','status','received_by','notes'
    ];

    public function client()
    {
        return $this->belongsTo('App\Client', 'client_id');
    }

    public function invoice()
    {
        return $this->belongsTo('App\Invoice', 'invoice_id');
    }

    public function items()
    {
        return $this->hasMany('App\Review_Item');
    }

    

    
}

