<?php

namespace App\Http\Resources\JobSeekerNotification;

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

class JobSeekerNotificationResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @return array<string, mixed>
     */
    public function toArray(Request $request): array
    {
        return [
            'id'          => $this->id,
            'description' => $this->description,
            'is_read'     => $this->is_read,
            'name'        => $this->name,
            'created_at'  => date('F d, Y h:i A', strtotime($this->created_at)),
            'type'        => $this->type,
        ];
    }
}
