src/Entity/News.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\NewsRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassNewsRepository::class)]
  7. class News extends Node
  8. {
  9.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  10.     private ?\DateTimeInterface $dateOfPublish null;
  11.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  12.     private ?\DateTimeInterface $dateFrom null;
  13.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  14.     private ?\DateTimeInterface $dateTill null;
  15.     #[ORM\OneToOne(cascade: ['persist''remove'])]
  16.     private ?Image $image null;
  17.     #[ORM\OneToOne(cascade: ['persist''remove'])]
  18.     private ?Image $banner null;
  19.     public function getDateOfPublish(): ?\DateTimeInterface
  20.     {
  21.         return $this->dateOfPublish;
  22.     }
  23.     public function setDateOfPublish(?\DateTimeInterface $dateOfPublish): static
  24.     {
  25.         $this->dateOfPublish $dateOfPublish;
  26.         return $this;
  27.     }
  28.     public function getDateFrom(): ?\DateTimeInterface
  29.     {
  30.         return $this->dateFrom;
  31.     }
  32.     public function setDateFrom(\DateTimeInterface $dateFrom): static
  33.     {
  34.         $this->dateFrom $dateFrom;
  35.         return $this;
  36.     }
  37.     public function getDateTill(): ?\DateTimeInterface
  38.     {
  39.         return $this->dateTill;
  40.     }
  41.     public function setDateTill(?\DateTimeInterface $dateTill): static
  42.     {
  43.         $this->dateTill $dateTill;
  44.         return $this;
  45.     }
  46.     public function getImage(): ?Image
  47.     {
  48.         return $this->image;
  49.     }
  50.     public function setImage(?Image $image): static
  51.     {
  52.         $this->image $image;
  53.         return $this;
  54.     }
  55.     public function getBanner(): ?Image
  56.     {
  57.         return $this->banner;
  58.     }
  59.     public function setBanner(?Image $banner): static
  60.     {
  61.         $this->banner $banner;
  62.         return $this;
  63.     }
  64. }