src/Entity/AdminPromo.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AdminPromoRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=AdminPromoRepository::class)
  7.  */
  8. class AdminPromo
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="datetime_immutable")
  18.      */
  19.     private $startAt;
  20.     /**
  21.      * @ORM\Column(type="datetime_immutable")
  22.      */
  23.     private $endAt;
  24.     /**
  25.      * @ORM\Column(type="boolean")
  26.      */
  27.     private $active;
  28.     /**
  29.      * @ORM\Column(type="float")
  30.      */
  31.     private $value;
  32.     /**
  33.      * @ORM\Column(type="datetime_immutable")
  34.      */
  35.     private $created_at;
  36.     public function __construct()
  37.     {
  38.         $this->created_at = new \DateTimeImmutable();
  39.         $this->active true// Default to active
  40.     }
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getStartAt(): ?\DateTimeImmutable
  46.     {
  47.         return $this->startAt;
  48.     }
  49.     public function setStartAt(\DateTimeImmutable $startAt): self
  50.     {
  51.         $this->startAt $startAt;
  52.         return $this;
  53.     }
  54.     public function getEndAt(): ?\DateTimeImmutable
  55.     {
  56.         return $this->endAt;
  57.     }
  58.     public function setEndAt(\DateTimeImmutable $endAt): self
  59.     {
  60.         $this->endAt $endAt;
  61.         return $this;
  62.     }
  63.     public function isActive(): ?bool
  64.     {
  65.         return $this->active;
  66.     }
  67.     public function setActive(bool $active): self
  68.     {
  69.         $this->active $active;
  70.         return $this;
  71.     }
  72.     public function getValue(): ?float
  73.     {
  74.         return $this->value;
  75.     }
  76.     public function setValue(float $value): self
  77.     {
  78.         $this->value $value;
  79.         return $this;
  80.     }
  81.     public function getCreatedAt(): ?\DateTimeImmutable
  82.     {
  83.         return $this->created_at;
  84.     }
  85.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  86.     {
  87.         $this->created_at $created_at;
  88.         return $this;
  89.     }
  90. }