<?php
namespace App\Entity;
use DateTimeInterface;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\Actuv2QuizVoteRepository;
/**
* Actuv2QuizVote
*
*/
#[ORM\Table(name: 'actuv2_quiz_vote')]
#[ORM\Entity(repositoryClass: Actuv2QuizVoteRepository::class)]
class Actuv2QuizVote
{
/**
* @var int
*
*/
#[ORM\Column(name: 'id', type: 'bigint', nullable: false)]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
private $id;
#[ORM\ManyToOne(targetEntity: Actuv2QuizAnswer::class, inversedBy: 'id')]
#[ORM\JoinColumn(nullable: false)]
private $answer;
#[ORM\ManyToOne(targetEntity: Actuv2Quiz::class, inversedBy: 'id' )]
#[ORM\JoinColumn(nullable: false)]
private $quiz;
#[ORM\Column(name: 'date', type: 'date', nullable: true, options: ['comment' => 'période'])]
private $date;
/**
* @var string
*
*/
#[ORM\Column(name: 'ip', type: 'string', length: 50, nullable: false)]
private $ip = '';
public function __construct()
{
}
public function getId(): ?string
{
return $this->id;
}
public function getAnswer(): ?Actuv2QuizAnswer
{
return $this->answer;
}
public function setAnswer(?Actuv2QuizAnswer $answer): self
{
$this->answer = $answer;
return $this;
}
public function getquiz(): ?Actuv2Quiz
{
return $this->quiz;
}
public function setquiz(?Actuv2Quiz $quiz): self
{
$this->quiz = $quiz;
return $this;
}
public function getDate(): ?DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getIp(): ?string
{
return $this->ip;
}
public function setIp(string $ip): self
{
$this->ip = $ip;
return $this;
}
}