<?php

namespace App\Http\Resources\Company;

use Illuminate\Http\Resources\Json\JsonResource;

class LoanBillingClientInvoiceDetails 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,
            'rate' => $this->rate,
            'original_rate' => $this->original_rate,
            'date_from' => $this->date_from,
            'date_to' => $this->date_to,
            'worker_id' => $this->worker_id,
            'first_name' => $this->first_name,
            'last_name' => $this->last_name,
            'worker_company_id' => $this->worker_company_id,
            'days' => $this->days,
            'other_expense' => $this->other_expense,
            'notes' => $this->notes,
            'client_request' => $this->client_request,
            'loaner_company_id' => $this->loaner_company_id,
            'borrower_company_id' => $this->borrower_company_id,
        ];
    }
}
