src/Entity/FAQ.php line 22

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Repository\FAQRepository;
  5. use App\Entity\Traits\ActiveTrait;
  6. use App\Entity\Traits\DeleteTrait;
  7. use App\Entity\Traits\SortOrderTrait;
  8. use App\Entity\Traits\TranslateTrait;
  9. use Gedmo\Mapping\Annotation as Gedmo;
  10. use App\Entity\Interfaces\DefaultEntity;
  11. use App\Entity\Traits\TitleAndContentTrait;
  12. use Gedmo\Timestampable\Traits\TimestampableEntity;
  13. /**
  14. * @Gedmo\Loggable
  15. */
  16. #[ORM\Entity(repositoryClass: FAQRepository::class)]
  17. #[ORM\HasLifecycleCallbacks]
  18. #[ORM\Table(name: 'faq')]
  19. class FAQ implements DefaultEntity
  20. {
  21. use TitleAndContentTrait;
  22. use SortOrderTrait;
  23. use ActiveTrait;
  24. use DeleteTrait;
  25. use TimestampableEntity;
  26. use TranslateTrait;
  27. #[ORM\Column(name: 'id', type: 'integer')]
  28. #[ORM\Id]
  29. #[ORM\GeneratedValue(strategy: 'AUTO')]
  30. private readonly int $id;
  31. #[ORM\Column(type: 'boolean')]
  32. private $featured;
  33. #[ORM\ManyToOne(targetEntity: ServiceCategory::class)]
  34. #[ORM\JoinColumn(nullable: false)]
  35. private $serviceCategory;
  36. public function getId(): ?int
  37. {
  38. return $this->id;
  39. }
  40. public function getFeatured(): ?bool
  41. {
  42. return $this->featured;
  43. }
  44. public function setFeatured(bool $featured): self
  45. {
  46. $this->featured = $featured;
  47. return $this;
  48. }
  49. public function getServiceCategory(): ?ServiceCategory
  50. {
  51. return $this->serviceCategory;
  52. }
  53. public function setServiceCategory(?ServiceCategory $serviceCategory): self
  54. {
  55. $this->serviceCategory = $serviceCategory;
  56. return $this;
  57. }
  58. }