<?php

namespace App\Http\Resources\Students;

use Illuminate\Http\Resources\Json\JsonResource;

class StudentRemovedResource extends JsonResource
{
    public function toArray($request): array
    {
        return [
            'id' => (int) ($this['id'] ?? 0),
            'school_id' => $this['school_id'] ?? null,
            'firstname' => $this['firstname'] ?? null,
            'lastname' => $this['lastname'] ?? null,
            'gender' => $this['gender'] ?? null,
            'age' => $this['age'] ?? null,
            'class_sections' => $this['class_sections'] ?? [],
            'class_section_name' => $this['class_section_name'] ?? null,
        ];
    }
}
