<?php

namespace App\Http\Resources\Classes;

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

class ClassSectionResource extends JsonResource
{
    public function toArray(Request $request): array
    {
        return [
            'id' => $this->resource->id ?? null,
            'class_id' => $this->resource->class_id ?? null,
            'class_section_id' => $this->resource->class_section_id ?? null,
            'class_section_name' => $this->resource->class_section_name ?? null,
            'class_name' => $this->resource->class_name ?? null,
            'semester' => $this->resource->semester ?? null,
            'school_year' => $this->resource->school_year ?? null,
            'created_at' => $this->resource->created_at ?? null,
            'updated_at' => $this->resource->updated_at ?? null,
        ];
    }
}
