<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class ReceiptResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        
        return [
            'id' => $this->id,
            'trans_type1' => $this->trans_type1,
            'trans_type2' => $this->trans_type2,
            'bill_no' => (int) $this->bill_no,
            'amount' => (double) $this->amount,
            'currency_id' => (int) $this->currency_id,
            'original_amount' => (double) $this->original_amount,
            'original_currency_id' => (int) $this->original_currency_id,
            'currency_rate' => (double) $this->currency_rate,
            'dt_transaction' => $this->dt_transaction,
            'status' => (int) $this->status,
            'booking_id' => (int) $this->booking_id,
            'company_id' => (int) $this->company_id
        ];
    }
}
