src/Entity/History.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use DateTime;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity(repositoryClass="App\Repository\HistoryRepository")
  7. */
  8. class History
  9. {
  10. /**
  11. * @ORM\Id()
  12. * @ORM\GeneratedValue()
  13. * @ORM\Column(type="integer")
  14. */
  15. private $id;
  16. /**
  17. * @ORM\ManyToOne(targetEntity="App\Entity\EventTag")
  18. * @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
  19. */
  20. private $eventTag;
  21. /**
  22. * @ORM\ManyToOne(targetEntity="App\Entity\Song")
  23. * @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
  24. */
  25. private $song;
  26. /**
  27. * @ORM\Column(type="datetime")
  28. */
  29. private $created;
  30. /**
  31. * @ORM\Column(type="integer", nullable=true)
  32. */
  33. private $testId;
  34. public function __construct()
  35. {
  36. $this->created = new DateTime();
  37. }
  38. public function getId(): ?int
  39. {
  40. return $this->id;
  41. }
  42. public function getEventTag(): ?EventTag
  43. {
  44. return $this->eventTag;
  45. }
  46. public function setEventTag(?EventTag $eventTag): self
  47. {
  48. $this->eventTag = $eventTag;
  49. return $this;
  50. }
  51. public function getSong(): ?Song
  52. {
  53. return $this->song;
  54. }
  55. public function setSong(?Song $song): self
  56. {
  57. $this->song = $song;
  58. return $this;
  59. }
  60. public function getCreated(): ?\DateTimeInterface
  61. {
  62. return $this->created;
  63. }
  64. public function setCreated(\DateTimeInterface $created): self
  65. {
  66. $this->created = $created;
  67. return $this;
  68. }
  69. public function getTestId(): ?int
  70. {
  71. return $this->testId;
  72. }
  73. public function setTestId(?int $testId): self
  74. {
  75. $this->testId = $testId;
  76. return $this;
  77. }
  78. }