<?php

namespace App\Http\Resources\Company;

use Illuminate\Http\Resources\Json\JsonResource;

class BorrowerApprovedInvoice 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,
            'tax' => $this->tax,
            'first_name' => $this->first_name,
            'last_name' => $this->last_name,
            'conx_status' => $this->conx_status,
            'days' => $this->days,
            'other_expense' => $this->other_expense,
            'ratingAsLoaner' => $this->ratingAsLoaner,
            'loaning_company' => $this->loaning_company,
            'borrower_company_id' => $this->borrower_company_id,
        ];
    }
}
