<?php

namespace App\Http\Resources;

use App\Helpers\ImageHelper;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

/**
 * @property mixed id
 * @property mixed status
 * @property mixed room_type
 * @property mixed days_count
 * @property mixed person_count
 * @property mixed going_date
 * @property mixed return_date
 * @property mixed added_service
 * @property mixed name
 * @property mixed email
 * @property mixed phone
 * @property mixed hotel_id
 * @property mixed city_id
 * @property mixed user_id
 * @property mixed hotel_email
 * @property mixed hotel_address
 * @property mixed hotel_image
 * @property mixed total
 * @property mixed added_service_price
 */
class HotelReservationResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'id' => $this->id,
            'status' => $this->status,
            'room_type' => $this->room_type,
            'days_count' => $this->days_count,
            'person_count' => $this->person_count,
            'going_date' => $this->going_date,
            'return_date' => $this->return_date,
            'added_service' => $this->added_service,
            'name' => $this->name,
            'email' => $this->email,
            'phone' => $this->phone,
            'hotel_id' => $this->hotel_id,
            'city_id' => $this->city_id,
            'user_id' => $this->user_id,
            'hotel_email' => $this->hotel_email,
            'hotel_address' => $this->hotel_address,
            'hotel_image' => ImageHelper::getFullPath($this->hotel_image),
            'total' => $this->total,
            'added_service_price' => $this->added_service_price,
        ];
    }
}
