src/Entity/Article.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ArticleRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity(repositoryClass=ArticleRepository::class)
  7. */
  8. class Article
  9. {
  10. /**
  11. * @ORM\Id
  12. * @ORM\GeneratedValue
  13. * @ORM\Column(type="integer")
  14. */
  15. private $id;
  16. /**
  17. * @ORM\Column(type="string", length=255)
  18. */
  19. private $title;
  20. /**
  21. * @ORM\Column(type="string", length=255)
  22. */
  23. private $slug;
  24. /**
  25. * @ORM\Column(type="text")
  26. */
  27. private $content;
  28. /**
  29. * @ORM\Column(type="string", length=255, nullable=true)
  30. */
  31. private $image;
  32. /**
  33. * @ORM\Column(type="datetime")
  34. */
  35. private $createdAt;
  36. /**
  37. * @ORM\Column(type="string", length=255, nullable=true)
  38. */
  39. private $metaTitle;
  40. /**
  41. * @ORM\Column(type="text", nullable=true)
  42. */
  43. private $metaDescription;
  44. public function __construct()
  45. {
  46. $this->createdAt = new \DateTime();
  47. }
  48. public function getId(): ?int
  49. {
  50. return $this->id;
  51. }
  52. public function getTitle(): ?string
  53. {
  54. return $this->title;
  55. }
  56. public function setTitle(string $title): self
  57. {
  58. $this->title = $title;
  59. return $this;
  60. }
  61. public function getSlug(): ?string
  62. {
  63. return $this->slug;
  64. }
  65. public function setSlug(string $slug): self
  66. {
  67. $this->slug = $slug;
  68. return $this;
  69. }
  70. public function getContent(): ?string
  71. {
  72. return $this->content;
  73. }
  74. public function setContent(string $content): self
  75. {
  76. $this->content = $content;
  77. return $this;
  78. }
  79. public function getImage(): ?string
  80. {
  81. return $this->image;
  82. }
  83. public function setImage(?string $image): self
  84. {
  85. $this->image = $image;
  86. return $this;
  87. }
  88. public function getCreatedAt(): ?\DateTimeInterface
  89. {
  90. return $this->createdAt;
  91. }
  92. public function setCreatedAt(\DateTimeInterface $createdAt): self
  93. {
  94. $this->createdAt = $createdAt;
  95. return $this;
  96. }
  97. public function getMetaTitle(): ?string
  98. {
  99. return $this->metaTitle;
  100. }
  101. public function setMetaTitle(?string $metaTitle): self
  102. {
  103. $this->metaTitle = $metaTitle;
  104. return $this;
  105. }
  106. public function getMetaDescription(): ?string
  107. {
  108. return $this->metaDescription;
  109. }
  110. public function setMetaDescription(?string $metaDescription): self
  111. {
  112. $this->metaDescription = $metaDescription;
  113. return $this;
  114. }
  115. }