<?php

namespace App\Http\Resources\Admin;

use Illuminate\Http\Resources\Json\JsonResource;

class ProductResourceDetail extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param \Illuminate\Http\Request $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'id'                    => $this->id,
            'name'                  => $this->name,
            'sku'                   => $this->sku,
            'slug'                  => $this->slug,
            'type'                  => $this->type,
            'default_price'         => $this->default_price,
            'regular_price_from'    => $this->regular_price_from,
            'discount'              => $this->discount,
            'discount_type'         => $this->discount_type,
            'image'                 => $this->image,
            'images'                => $this->images,
            'categories'            => $this->category,
            'colors'                => $this->color_detail,
            'scene_id'              => $this->scene_id,
            'gender'                => $this->gender,
            'material'              => $this->material,
            'rank'                  => $this->rank,
            'storage_date'          => $this->storage_date,
            'size'                  => $this->size,
            'height'                => $this->height,
            'sleeve'                => $this->sleeve,
            'sleeve_length'         => $this->sleeve_length,
            'hip'                   => $this->hip,
            'front_width'           => $this->primary_width,
            'rear_width'            => $this->second_width,
            'undergarment_length'   => $this->undergarment_length,
            'schedules'             => $this->schedule,
            'description'           => $this->description,
            'note'                  => $this->note,
            'keyword_detail'        => $this->keyword_detail,
            'is_cleaning_service'   => $this->is_cleaning_service,
            'is_storage_period'     => $this->is_storage_period,
            'is_available_in_stock' => $this->is_available_in_stock,
            'is_allow_faceswap'     => $this->is_allow_faceswap,
            'is_activated'          => $this->is_activated,
        ];
    }
}
