src/Entity/SpecialDiscount.php line 9

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SpecialDiscountRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassSpecialDiscountRepository::class)]
  6. class SpecialDiscount
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private ?int $id null;
  12.     #[ORM\ManyToOne(targetEntityProducts::class, inversedBy'specialDiscount'fetch'EAGER')]
  13.     private $product;
  14.     #[ORM\Column(name'dateStart'type'date'nullabletrue)]
  15.     private ?\DateTime $dateStart;
  16.     #[ORM\Column(name'dateEnd'type'date'nullabletrue)]
  17.     private ?\DateTime $dateEnd;
  18.     #[ORM\Column(name'pourcentRebate'type'integer')]
  19.     private ?int $pourcentRebate;
  20.     #[ORM\Column(name'image'type'text'nullabletrue)]
  21.     private ?string $image;
  22.     public function getId(): ?int
  23.     {
  24.         return $this->id;
  25.     }
  26.     /**
  27.      * @return mixed
  28.      */
  29.     public function getProduct()
  30.     {
  31.         return $this->product;
  32.     }
  33.     /**
  34.      * @param mixed $product
  35.      */
  36.     public function setProduct($product): void
  37.     {
  38.         $this->product $product;
  39.     }
  40.     /**
  41.      * @return \DateTime|null
  42.      */
  43.     public function getDateStart(): ?\DateTime
  44.     {
  45.         return $this->dateStart;
  46.     }
  47.     /**
  48.      * @param \DateTime|null $dateStart
  49.      */
  50.     public function setDateStart(?\DateTime $dateStart): void
  51.     {
  52.         $this->dateStart $dateStart;
  53.     }
  54.     /**
  55.      * @return \DateTime|null
  56.      */
  57.     public function getDateEnd(): ?\DateTime
  58.     {
  59.         return $this->dateEnd;
  60.     }
  61.     /**
  62.      * @param \DateTime|null $dateEnd
  63.      */
  64.     public function setDateEnd(?\DateTime $dateEnd): void
  65.     {
  66.         $this->dateEnd $dateEnd;
  67.     }
  68.     /**
  69.      * @return int|null
  70.      */
  71.     public function getPourcentRebate(): ?int
  72.     {
  73.         return $this->pourcentRebate;
  74.     }
  75.     /**
  76.      * @param int|null $pourcentRebate
  77.      */
  78.     public function setPourcentRebate(?int $pourcentRebate): void
  79.     {
  80.         $this->pourcentRebate $pourcentRebate;
  81.     }
  82.     /**
  83.      * @return string|null
  84.      */
  85.     public function getImage(): ?string
  86.     {
  87.         return $this->image;
  88.     }
  89.     /**
  90.      * @param string|null $image
  91.      */
  92.     public function setImage(?string $image): void
  93.     {
  94.         $this->image $image;
  95.     }
  96. }