<?php

namespace App\Http\Resources\Company;

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,
            'transaction_date' => $this->transaction_date,
            'invoice_no' => $this->invoice_no,
            'worker_id' => $this->worker_id,
            'company_worker_id' => $this->company_worker_id,
            'rate' => $this->rate,
            'tax' => $this->tax,
            'date_from' => $this->date_from,
            'date_to' => $this->date_to,
            'days' => $this->days,
            'other_expense' => $this->other_expense,
            'street_address' => $this->street_address,
            'city' => $this->city,
            'state' => $this->state,
            'zipcode' => $this->zipcode,
            'company_tel' => $this->company_tel,
            'email_address' => $this->email_address,
            'first_name' => $this->first_name,
            'last_name' => $this->last_name,
            'ratingAsLoaner' => $this->ratingAsLoaner,
            'loaning_company' => $this->loaning_company,
        ];
    }
}
