<?php

namespace App\Http\Resources;

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

class TherapistResource extends JsonResource
{
    public function toArray(Request $request): array
    {
        return [
            'id' => $this->id,
            'name' => $this->name,
            'email' => $this->email,
            'role' => $this->role,
            'specialization' => $this->specialization,
            'hourly_rate' => $this->hourly_rate,
            'session_rate' => $this->session_rate,
            'target_sessions_per_day' => $this->target_sessions_per_day,
            'target_sessions_per_month' => $this->target_sessions_per_month,
            'working_schedule' => $this->working_schedule,
            'created_at' => $this->created_at?->format('Y-m-d H:i:s'),
        ];
    }
}
