<?php

namespace App\Http\Resources\Reports\ReportCards;

use Illuminate\Http\Resources\Json\JsonResource;

class ReportCardAcknowledgementResource extends JsonResource
{
    public function toArray($request): array
    {
        return [
            'student_id' => (int) ($this['student_id'] ?? 0),
            'school_year' => (string) ($this['school_year'] ?? ''),
            'semester' => (string) ($this['semester'] ?? ''),
            'viewed_at' => $this['viewed_at'] ?? null,
            'signed_at' => $this['signed_at'] ?? null,
            'signed_name' => $this['signed_name'] ?? null,
        ];
    }
}
