<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class RequestForQuotation extends Model
{
    use SoftDeletes;

    protected $table='request_for_quotations';

    public function client(){
        return $this->belongsTo(Client::class,'client_id')->withTrashed();
    }
    public function created_by_user(){
        return $this->belongsTo(User::class,'created_by_user_id');
    }
    public function reviewed_by_user(){
        return $this->belongsTo(User::class,'reviewed_by_user_id');
    }
    public function tnc(){
        return $this->belongsTo(TermsAndConditions::class,'tnc_id')->withTrashed();
    }
    public function payment_status(){
        return $this->belongsTo(PaymentStatus::class,'payment_status_id')->withTrashed();
    }
    public function indirect_tax(){
        return $this->belongsTo(Client::class,'indirect_tax_id');
    }
    public function quot_status(){
        return $this->belongsTo(QuotStatus::class,'quot_status_id');
    }
    public function bank_details(){
        return $this->belongsTo(BankDetails::class,'bank_details_id')->withTrashed();
    }
    public function delivery_address(){
        return $this->belongsTo(ClientAddress::class,'delivery_address_id')->withTrashed();
    }
    public function client_address(){
        return $this->belongsTo(ClientAddress::class,'client_address_id')->withTrashed();
    }
    public function quotation_details(){
        return $this->belongsTo(QuotationDetails::class,'quotatio_details_id')->withTrashed();
    }
}
