<?php
namespace App\Entity;
use App\Repository\PeriodRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=PeriodRepository::class)
*/
class Period
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer")
*/
private $year;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $month;
/**
* @ORM\Column(type="bigint", nullable=true)
*/
private $value;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $periodDate;
/**
* @ORM\ManyToOne(targetEntity=ReporterPartner::class, inversedBy="periods")
* @ORM\JoinColumn(name="reporter_partner_id", referencedColumnName="id")
*/
private ReporterPartner $reporterPartner;
public function __construct($repPar)
{
$this->reporterPartner = $repPar;
}
public function getId(): ?int
{
return $this->id;
}
public function getYear(): ?int
{
return $this->year;
}
public function setYear(int $year): self
{
$this->year = $year;
return $this;
}
public function getMonth(): ?int
{
return $this->month;
}
public function setMonth(?int $month): self
{
$this->month = $month;
return $this;
}
public function getValue(): ?int
{
return $this->value;
}
public function setValue(?int $value): self
{
$this->value = $value;
return $this;
}
/**
* @return mixed
*/
public function getPeriodDate(): ?\DateTime
{
return $this->periodDate;
}
/**
* @param mixed $periodDate
*/
public function setPeriodDate(?\DateTime $periodDate): void
{
$this->periodDate = $periodDate;
}
/**
* @return ReporterPartner|null
*/
public function getReporterPartner(): Collection
{
return $this->reporterPartner;
}
}