src/Entity/Article.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 Article
  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)
  17. */
  18. private $title;
  19. /**
  20. * @ORM\Column(type="text")
  21. */
  22. private $content;
  23. /**
  24. * @ORM\Column(type="string", length=255)
  25. */
  26. private $author;
  27. /**
  28. * @ORM\Column(type="datetime")
  29. */
  30. private $createdAt;
  31. /**
  32. * @ORM\Column(type="string", length=255)
  33. */
  34. private $category;
  35. /**
  36. * @ORM\Column(type="string", length=255, nullable=true)
  37. */
  38. private $image;
  39. /**
  40. * @ORM\Column(type="boolean")
  41. */
  42. private $isFeatured = false;
  43. public function getId(): ?int { return $this->id; }
  44. public function getTitle(): ?string { return $this->title; }
  45. public function setTitle(string $title): self { $this->title = $title; return $this; }
  46. public function getContent(): ?string { return $this->content; }
  47. public function setContent(string $content): self { $this->content = $content; return $this; }
  48. public function getAuthor(): ?string { return $this->author; }
  49. public function setAuthor(string $author): self { $this->author = $author; return $this; }
  50. public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; }
  51. public function setCreatedAt(\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; }
  52. public function getCategory(): ?string { return $this->category; }
  53. public function setCategory(string $category): self { $this->category = $category; return $this; }
  54. public function getImage(): ?string { return $this->image; }
  55. public function setImage(?string $image): self { $this->image = $image; return $this; }
  56. public function getIsFeatured(): ?bool { return $this->isFeatured; }
  57. public function setIsFeatured(bool $isFeatured): self { $this->isFeatured = $isFeatured; return $this; }
  58. }