src/Entity/Testimonial.php line 25

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Entity\Traits\ActiveTrait;
  5. use App\Entity\Traits\DeleteTrait;
  6. use App\Entity\Traits\SubTitleTrait;
  7. use App\Entity\Traits\SortOrderTrait;
  8. use App\Entity\Traits\TranslateTrait;
  9. use App\Entity\Traits\FileUploadTrait;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. use App\Entity\Traits\ImageUploadTrait;
  12. use App\Entity\Interfaces\DefaultEntity;
  13. use App\Repository\TestimonialRepository;
  14. use App\Entity\Traits\TitleAndContentTrait;
  15. use Gedmo\Timestampable\Traits\TimestampableEntity;
  16. /**
  17. * @Gedmo\Loggable
  18. */
  19. #[ORM\Entity(repositoryClass: TestimonialRepository::class)]
  20. #[ORM\HasLifecycleCallbacks]
  21. #[ORM\Table(name: 'testimonial')]
  22. class Testimonial implements DefaultEntity
  23. {
  24. use TitleAndContentTrait; // DefaultEntity & DefaultLinkedEntity
  25. use ActiveTrait; // DefaultEntity & DefaultLinkedEntity
  26. use DeleteTrait; // DefaultEntity & DefaultLinkedEntity
  27. use TimestampableEntity; // DefaultEntity & DefaultLinkedEntity
  28. use TranslateTrait; // DefaultEntity & DefaultLinkedEntity
  29. use SubTitleTrait; // Optional
  30. use ImageUploadTrait; // Optional
  31. use FileUploadTrait; // Optional
  32. use SortOrderTrait; // Optional
  33. #[ORM\Column(name: 'id', type: 'integer')]
  34. #[ORM\Id]
  35. #[ORM\GeneratedValue(strategy: 'AUTO')]
  36. private readonly int $id;
  37. #[ORM\Column(type: 'string', length: 255)]
  38. private $author;
  39. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  40. private $company;
  41. #[ORM\Column(type: 'boolean', options: ['default' => false])]
  42. private $featured;
  43. public function getId(): ?int
  44. {
  45. return $this->id;
  46. }
  47. public function getAuthor(): ?string
  48. {
  49. return $this->author;
  50. }
  51. public function setAuthor(string $author): self
  52. {
  53. $this->author = $author;
  54. return $this;
  55. }
  56. public function getCompany(): ?string
  57. {
  58. return $this->company;
  59. }
  60. public function setCompany(?string $company): self
  61. {
  62. $this->company = $company;
  63. return $this;
  64. }
  65. public function getFeatured(): ?bool
  66. {
  67. return $this->featured;
  68. }
  69. public function setFeatured(bool $featured): self
  70. {
  71. $this->featured = $featured;
  72. return $this;
  73. }
  74. }