<?php

namespace App\Modules\HR\Positions\Resources;

use App\Modules\HR\Positions\Models\Position;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

/**
 * @mixin Position
 */
class PositionResource extends JsonResource
{
    /**
     * @return array<string, mixed>
     */
    public function toArray(Request $request): array
    {
        return [
            'id' => $this->id,
            'title' => $this->title,
            'department_id' => $this->department_id,
            'job_grade_id' => $this->job_grade_id,
            'salary' => $this->salary,
            'min_salary' => $this->min_salary,
            'max_salary' => $this->max_salary,
            'description' => $this->description,
            'responsibilities' => $this->responsibilities,
            'required_skills' => $this->required_skills,
            'kpis' => $this->kpis,
            'required_training' => $this->required_training,
            'career_path' => $this->career_path,
            'is_active' => $this->is_active,
        ];
    }
}
