<?php

namespace App\Http\Resources\Reports\Stickers;

use Illuminate\Http\Resources\Json\JsonResource;

class StickerStudentResource extends JsonResource
{
    public function toArray($request): array
    {
        return [
            'id' => (int) ($this['id'] ?? 0),
            'firstname' => (string) ($this['firstname'] ?? ''),
            'lastname' => (string) ($this['lastname'] ?? ''),
            'registration_grade' => $this['registration_grade'] ?? null,
            'gender' => $this['gender'] ?? null,
        ];
    }
}
