<?php

namespace App\Http\Resources\Admin;

use Illuminate\Http\Resources\Json\JsonResource;

class BorrowerApprovedInvoiceDetails 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,
            'invoice_no' => $this->invoice_no,
            'original_rate' => $this->original_rate,
            'rate' => $this->rate,
            'tax' => $this->tax,
            'transaction_date' => $this->transaction_date,
            'worker_id' => $this->worker_id,
            'first_name' => $this->first_name,
            'last_name' => $this->last_name,
            'loaner_status' => $this->loaner_status,
            'days' => $this->days,
            'other_expense' => $this->other_expense,
            'outstanding_balance' => $this->outstanding_balance,
            'borrowing_company' => $this->borrowing_company,
            'company_tel' => $this->company_tel,
            'email_address' => $this->email_address,
            'street_address' => $this->street_address,
            'city' => $this->city,
            'state' => $this->state,
            'zipcode' => $this->zipcode,
        ];
    }
}
