<?php

namespace App\Http\Resources\Company;

use Illuminate\Http\Resources\Json\JsonResource;

class LoanerApprovedInvoice extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
     */
    public function toArray($request)
    {
        return [
            'id' => $this->id,
            'transaction_date' => $this->transaction_date,
            'invoice_no' => $this->invoice_no,
            'rate' => $this->rate,
            'original_rate' => $this->original_rate,
            'first_name' => $this->first_name,
            'last_name' => $this->last_name,
            'loaner_status' => $this->loaner_status,
            'days' => $this->days,
            'other_expense' => $this->other_expense,
            'loaning_company' => $this->loaning_company,
            'borrowing_company' => $this->borrowing_company,
            'ratingAsBorrower' => $this->ratingAsBorrower,
        ];
    }
}
