78 lines
1.3 KiB
PHP
78 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\VoteRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
* @ORM\Entity(repositoryClass=VoteRepository::class)
|
|
*/
|
|
class Vote
|
|
{
|
|
/**
|
|
* @ORM\Id()
|
|
* @ORM\GeneratedValue()
|
|
* @ORM\Column(type="integer")
|
|
*/
|
|
private $id;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="App\Entity\Guest", inversedBy="votes")
|
|
*/
|
|
private $guest;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="App\Entity\Option", inversedBy="votes")
|
|
*/
|
|
private $option;
|
|
|
|
/**
|
|
* @ORM\Column(name="vote", type="integer", nullable=true)
|
|
*/
|
|
private $vote;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getGuest(): ?Guest
|
|
{
|
|
return $this->guest;
|
|
}
|
|
|
|
public function setGuest(?Guest $guest): self
|
|
{
|
|
$this->guest = $guest;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getOption(): ?Option
|
|
{
|
|
return $this->option;
|
|
}
|
|
|
|
public function setOption(?Option $option): self
|
|
{
|
|
$this->option = $option;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getVote(): ?int
|
|
{
|
|
return $this->vote;
|
|
}
|
|
|
|
public function setVote(?int $vote): self
|
|
{
|
|
$this->vote = $vote;
|
|
|
|
return $this;
|
|
}
|
|
|
|
|
|
}
|