src/Entity/CmsQuote.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CmsQuoteRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassCmsQuoteRepository::class)]
  7. class CmsQuote
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(typeTypes::TEXT)]
  14.     private ?string $quote null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $author null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $profesion null;
  19.     #[ORM\Column]
  20.     private ?\DateTimeImmutable $createdAt null;
  21.     #[ORM\Column]
  22.     private ?\DateTimeImmutable $updatedAt null;
  23.     #[ORM\OneToOne(cascade: ['persist''remove'])]
  24.     private ?Attachment $thumbnail null;
  25.     #[ORM\Column]
  26.     private ?bool $isPublic null;
  27.     public function __construct()
  28.     {
  29.         if (!$this->createdAt)
  30.             $this->createdAt = new \DateTimeImmutable();
  31.         $this->updatedAt = new \DateTimeImmutable();
  32.     }
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getQuote(): ?string
  38.     {
  39.         return $this->quote;
  40.     }
  41.     public function setQuote(string $quote): self
  42.     {
  43.         $this->quote $quote;
  44.         return $this;
  45.     }
  46.     public function getAuthor(): ?string
  47.     {
  48.         return $this->author;
  49.     }
  50.     public function setAuthor(string $author): self
  51.     {
  52.         $this->author $author;
  53.         return $this;
  54.     }
  55.     public function getProfesion(): ?string
  56.     {
  57.         return $this->profesion;
  58.     }
  59.     public function setProfesion(string $profesion): self
  60.     {
  61.         $this->profesion $profesion;
  62.         return $this;
  63.     }
  64.     public function getCreatedAt(): ?\DateTimeImmutable
  65.     {
  66.         return $this->createdAt;
  67.     }
  68.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  69.     {
  70.         $this->createdAt $createdAt;
  71.         return $this;
  72.     }
  73.     public function getUpdatedAt(): ?\DateTimeImmutable
  74.     {
  75.         return $this->updatedAt;
  76.     }
  77.     public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
  78.     {
  79.         $this->updatedAt $updatedAt;
  80.         return $this;
  81.     }
  82.     public function getThumbnail(): ?Attachment
  83.     {
  84.         return $this->thumbnail;
  85.     }
  86.     public function setThumbnail(?Attachment $thumbnail): self
  87.     {
  88.         $this->thumbnail $thumbnail;
  89.         return $this;
  90.     }
  91.     public function isIsPublic(): ?bool
  92.     {
  93.         return $this->isPublic;
  94.     }
  95.     public function setIsPublic(bool $isPublic): self
  96.     {
  97.         $this->isPublic $isPublic;
  98.         return $this;
  99.     }
  100. }