src/Entity/Period.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PeriodRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=PeriodRepository::class)
  9.  */
  10. class Period
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="integer")
  20.      */
  21.     private $year;
  22.     /**
  23.      * @ORM\Column(type="integer", nullable=true)
  24.      */
  25.     private $month;
  26.     /**
  27.      * @ORM\Column(type="bigint", nullable=true)
  28.      */
  29.     private $value;
  30.     /**
  31.      * @ORM\Column(type="date", nullable=true)
  32.      */
  33.     private $periodDate;
  34.     /**
  35.      * @ORM\ManyToOne(targetEntity=ReporterPartner::class, inversedBy="periods")
  36.      * @ORM\JoinColumn(name="reporter_partner_id", referencedColumnName="id")
  37.      */
  38.     private ReporterPartner $reporterPartner;
  39.     public function __construct($repPar)
  40.     {
  41.         $this->reporterPartner $repPar;
  42.     }
  43.     public function getId(): ?int
  44.     {
  45.         return $this->id;
  46.     }
  47.     public function getYear(): ?int
  48.     {
  49.         return $this->year;
  50.     }
  51.     public function setYear(int $year): self
  52.     {
  53.         $this->year $year;
  54.         return $this;
  55.     }
  56.     public function getMonth(): ?int
  57.     {
  58.         return $this->month;
  59.     }
  60.     public function setMonth(?int $month): self
  61.     {
  62.         $this->month $month;
  63.         return $this;
  64.     }
  65.     public function getValue(): ?int
  66.     {
  67.         return $this->value;
  68.     }
  69.     public function setValue(?int $value): self
  70.     {
  71.         $this->value $value;
  72.         return $this;
  73.     }
  74.     /**
  75.      * @return mixed
  76.      */
  77.     public function getPeriodDate(): ?\DateTime
  78.     {
  79.         return $this->periodDate;
  80.     }
  81.     /**
  82.      * @param mixed $periodDate
  83.      */
  84.     public function setPeriodDate(?\DateTime $periodDate): void
  85.     {
  86.         $this->periodDate $periodDate;
  87.     }
  88.     /**
  89.      * @return ReporterPartner|null
  90.      */
  91.     public function getReporterPartner(): Collection
  92.     {
  93.         return $this->reporterPartner;
  94.     }
  95. }