src/Entity/Discount.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DiscountRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassDiscountRepository::class)]
  6. class Discount extends \App\Entity\Node
  7. {
  8.     #[ORM\Column(type"datetime"nullablefalse)]
  9.     private $dateFrom;
  10.     #[ORM\Column(type"datetime"nullabletrue)]
  11.     private $dateTill;
  12.     #[ORM\Column(type"datetime"nullabletrue)]
  13.     private $dateToPublish;
  14.     #[ORM\OneToOne(cascade: ['persist''remove'])]
  15.     private ?Image $image null;
  16.     #[ORM\OneToOne(cascade: ['persist''remove'])]
  17.     private ?Image $banner null;
  18.     /**
  19.      * @return mixed
  20.      */
  21.     public function getDateFrom()
  22.     {
  23.         return $this->dateFrom;
  24.     }
  25.     /**
  26.      * @param mixed $dateFrom
  27.      */
  28.     public function setDateFrom($dateFrom): void
  29.     {
  30.         $this->dateFrom $dateFrom;
  31.     }
  32.     /**
  33.      * @return mixed
  34.      */
  35.     public function getDateTill()
  36.     {
  37.         return $this->dateTill;
  38.     }
  39.     /**
  40.      * @param mixed $dateTill
  41.      */
  42.     public function setDateTill($dateTill): void
  43.     {
  44.         $this->dateTill $dateTill;
  45.     }
  46.     /**
  47.      * @return mixed
  48.      */
  49.     public function getDateToPublish()
  50.     {
  51.         return $this->dateToPublish;
  52.     }
  53.     /**
  54.      * @param mixed $dateToPublish
  55.      */
  56.     public function setDateToPublish($dateToPublish): void
  57.     {
  58.         $this->dateToPublish $dateToPublish;
  59.     }
  60.     public function getImage(): ?Image
  61.     {
  62.         return $this->image;
  63.     }
  64.     public function setImage(?Image $image): void
  65.     {
  66.         $this->image $image;
  67.     }
  68.     public function getBanner(): ?Image
  69.     {
  70.         return $this->banner;
  71.     }
  72.     public function setBanner(?Image $banner): void
  73.     {
  74.         $this->banner $banner;
  75.     }
  76. }