<?php

namespace App\Http\Resources;

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

class ProductContributionResource extends JsonResource
{
    public function toArray(Request $request): array
    {
        return [
            'id'               => $this->id,
            'age_group_label'  => $this->age_group_label,
            'age_min_months'   => $this->age_min_months,
            'age_max_months'   => $this->age_max_months,
            'contribution_pkr' => (float) $this->contribution_pkr,
        ];
    }
}