<?php

namespace App\Http\Resources\Admin;

use Illuminate\Http\Resources\Json\JsonResource;

class Earnings 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,
            'company_name' => $this->company_name,
            'rate' => $this->rate,
            'original_rate' => $this->original_rate,
            'days' => $this->days,
            'other_expense' => $this->other_expense,
            'earning_type' => $this->earning_type,
        ];
    }
}
