<?php
namespace App\Entity\Special;
use App\Entity\CuttingSchedule;
use App\Entity\Person;
use App\Entity\User;
use App\Repository\Special\VotingInfoRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=VotingInfoRepository::class)
*/
class VotingInfo
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $createdAt;
/**
* @ORM\ManyToOne(targetEntity=Person::class, inversedBy="votingInfos")
* @ORM\JoinColumn(nullable=false)
*/
private $person;
/**
* @ORM\ManyToOne(targetEntity=CuttingSchedule::class, inversedBy="votingInfos")
* @ORM\JoinColumn(nullable=true)
*/
private $CuttingSchedule;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="votingInfos")
* @ORM\JoinColumn(nullable=false)
*/
private $createdBy;
public function getId(): ?int
{
return $this->id;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getPerson(): ?Person
{
return $this->person;
}
public function setPerson(?Person $person): self
{
$this->person = $person;
return $this;
}
public function getCuttingSchedule(): ?CuttingSchedule
{
return $this->CuttingSchedule;
}
public function setCuttingSchedule(?CuttingSchedule $CuttingSchedule): self
{
$this->CuttingSchedule = $CuttingSchedule;
return $this;
}
public function getCreatedBy(): ?User
{
return $this->createdBy;
}
public function setCreatedBy(?User $createdBy): self
{
$this->createdBy = $createdBy;
return $this;
}
}