<?php

namespace App\Http\Resources;

use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

class placedOrderResources extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @return array<string, mixed>
     */
    public function toArray(Request $request): array
    {
        return [
            'id'                   => $this->id,
            'bill_id'              => $this->order_random_id,
            'order_date'           => $this->order_date,
            'user_id'              => $this->user_id,
            'user_name'            => $this->user_name,
            'category_id'          => $this->category_id,
            'category_name'        => $this->category_name,
            'subcategory_id'       => $this->subcategory_id,
            'subcategory_name'     => $this->subcategory_name,
            'order_random_id'      => $this->order_random_id,
            'product_details_id'   => $this->product_details_id,
            'product_details_name' => $this->product_details_name,
            'quantity'             => $this->quantity,
            'amount'               => $this->amount,
            'delivery_address'     => $this->delivery_address,
            'instruction'          => $this->instruction,
            'courier'              => $this->courier,
            'tracking_id'          => $this->tracking_id,
            'status'               => $this->status,
        ];
    }
}
