<?php
declare(strict_types=1);

namespace App\Entity\Traits;

use Doctrine\ORM\Mapping as ORM;

trait ActivityYearTrait
{

    #[ORM\Column(nullable: true)]
    private ?int $startYear = null;

    #[ORM\Column(nullable: true)]
    private ?int $endYear = null;

    public function getStartYear(): ?int {
        return $this->startYear;
    }

    public function setStartYear(?int $startYear = null): self {
        $this->startYear = $startYear ?? (int)(date('Y'));
        return $this;
    }

    public function getEndYear():?int {
        return $this->endYear;
    }

    public function setEndYear(?int $endYear):self {
        $this->endYear = $endYear;
        return $this;
    }
}
