<?php

namespace DMD\LaLigaApi\Dto;

class SeasonDataDto
{
    public int $id;
    public int $teamId;
    public int $points;
    public int $seasonId;

    public function fillFromArray(array $dataList): void
    {
        if (isset($dataList['id']))
        {
            $this->id = (int) $dataList['id'];
        }
        if (isset($dataList['teamId']))
        {
            $this->teamId = $dataList['teamId'];
        }
        if (isset($dataList['points']))
        {
            $this->points = $dataList['points'];
        }
        if (isset($dataList['seasonId']))
        {
            $this->seasonId = $dataList['seasonId'];
        }
    }
}