src/Entity/Gallery.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Entity()
  6. */
  7. class Gallery
  8. {
  9. /**
  10. * @ORM\Id
  11. * @ORM\GeneratedValue
  12. * @ORM\Column(type="integer")
  13. */
  14. private $id;
  15. /**
  16. * @ORM\Column(type="string", length=255, nullable=true)
  17. */
  18. private $title;
  19. /**
  20. * @ORM\Column(type="string", length=255)
  21. */
  22. private $image;
  23. /**
  24. * @ORM\Column(type="string", length=255, nullable=true)
  25. */
  26. private $category;
  27. /**
  28. * @ORM\Column(type="boolean")
  29. */
  30. private $isVideo = false;
  31. /**
  32. * @ORM\Column(type="datetime")
  33. */
  34. private $createdAt;
  35. public function __construct()
  36. {
  37. $this->createdAt = new \DateTime();
  38. }
  39. public function getId(): ?int
  40. {
  41. return $this->id;
  42. }
  43. public function getTitle(): ?string
  44. {
  45. return $this->title;
  46. }
  47. public function setTitle(?string $title): self
  48. {
  49. $this->title = $title;
  50. return $this;
  51. }
  52. public function getImage(): ?string
  53. {
  54. return $this->image;
  55. }
  56. public function setImage(string $image): self
  57. {
  58. $this->image = $image;
  59. return $this;
  60. }
  61. public function getCategory(): ?string
  62. {
  63. return $this->category;
  64. }
  65. public function setCategory(?string $category): self
  66. {
  67. $this->category = $category;
  68. return $this;
  69. }
  70. public function getIsVideo(): ?bool
  71. {
  72. return $this->isVideo;
  73. }
  74. public function setIsVideo(bool $isVideo): self
  75. {
  76. $this->isVideo = $isVideo;
  77. return $this;
  78. }
  79. public function getCreatedAt(): ?\DateTimeInterface
  80. {
  81. return $this->createdAt;
  82. }
  83. public function setCreatedAt(\DateTimeInterface $createdAt): self
  84. {
  85. $this->createdAt = $createdAt;
  86. return $this;
  87. }
  88. }