<?php

namespace App\Http\Resources\Admin;

use Illuminate\Http\Resources\Json\JsonResource;

class FortunetellerResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param \Illuminate\Http\Request $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'id'                   => $this->id,
            'number'               => $this->number,
            'slug'                 => $this->slug,
            'name'                 => $this->name,
            'display_name'         => $this->display_name,
            'shop_id'              => $this->shop_id,
            'category_id'          => $this->category_id,
            'gender'               => $this->gender,
            'age'                  => $this->age,
            'phone_number'         => $this->phone_number,
            'email'                => $this->email,
            'address'              => $this->address,
            'avatar'               => $this->avatar,
            'desc_1_image'         => $this->desc_1_image,
            'desc_1_title'         => $this->desc_1_title,
            'desc_1_short'         => $this->desc_1_short,
            'desc_1_full'          => $this->desc_1_full,
            'desc_2_image'         => $this->desc_2_image,
            'desc_2_title'         => $this->desc_2_title,
            'desc_2_short'         => $this->desc_2_short,
            'desc_2_full'          => $this->desc_2_full,
            'cost'                 => $this->cost,
            'consultation_minutes' => $this->consultation_minutes,
            'performance'          => $this->performance,
            'use_scry'             => $this->use_scry,
            'consultation_genre'   => $this->consultation_genre,
            'good_consultation'    => $this->good_consultation,
            'commitment'           => $this->commitment,
            'boom'                 => $this->boom,
            'message'              => $this->message,
            'message_image'        => $this->message_image,
            'slider'               => isset($this->slider) ? $this->slider : [],
            'gallery'              => isset($this->gallery) ? $this->gallery : [],
            'method'               => isset($this->method) ? $this->method : [],
            'consultation'         => isset($this->consultation) ? $this->consultation : [],
            'schedule'             => isset($this->schedule) ? $this->schedule : [],
            'profile'              => isset($this->profile) ? $this->profile : [],
            'info'                 => [],
            'comment'              => isset($this->comment) ? $this->comment : [],
            'review'               => isset($this->review) ? $this->review : [],
            'shop'                 => isset($this->shop) ? $this->shop : [],
            'tag'                  => isset($this->tag) ? $this->tag : [],
            'preview_code'         => $this->preview_code,
            'show_top'             => $this->show_top,
            'is_popular'           => $this->is_popular,
            'assigned_user_id'     => $this->assigned_user_id,
            'seo'                  => $this->seo,
            'is_activated'         => $this->is_activated,
            'is_deleted'           => $this->is_deleted,
            'created_at'           => isset($this->created_at) ? date('Y-m-d H:i:s', strtotime($this->created_at)) : null,
            'updated_at'           => isset($this->updated_at) ? date('Y-m-d H:i:s', strtotime($this->updated_at)) : null,
        ];
    }
}
