<?php
namespace App\Entity;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\HistoryRepository")
*/
class History
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\EventTag")
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
*/
private $eventTag;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Song")
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
*/
private $song;
/**
* @ORM\Column(type="datetime")
*/
private $created;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $testId;
public function __construct()
{
$this->created = new DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getEventTag(): ?EventTag
{
return $this->eventTag;
}
public function setEventTag(?EventTag $eventTag): self
{
$this->eventTag = $eventTag;
return $this;
}
public function getSong(): ?Song
{
return $this->song;
}
public function setSong(?Song $song): self
{
$this->song = $song;
return $this;
}
public function getCreated(): ?\DateTimeInterface
{
return $this->created;
}
public function setCreated(\DateTimeInterface $created): self
{
$this->created = $created;
return $this;
}
public function getTestId(): ?int
{
return $this->testId;
}
public function setTestId(?int $testId): self
{
$this->testId = $testId;
return $this;
}
}