<?php
namespace App\Entity;
use App\Repository\VoteRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: VoteRepository::class)]
class Vote
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'allVotes')]
private ?Battle $battle = null;
#[ORM\Column]
private ?int $voteValue = null;
#[ORM\ManyToOne(inversedBy: 'myBattleVotes')]
private ?Client $voter = null;
public function getId(): ?int
{
return $this->id;
}
public function getBattle(): ?Battle
{
return $this->battle;
}
public function setBattle(?Battle $battle): static
{
$this->battle = $battle;
return $this;
}
public function getVoteValue(): ?int
{
return $this->voteValue;
}
public function setVoteValue(int $voteValue): static
{
$this->voteValue = $voteValue;
return $this;
}
public function getVoter(): ?Client
{
return $this->voter;
}
public function setVoter(?Client $voter): static
{
$this->voter = $voter;
return $this;
}
}