src/Entity/Extra.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ExtraRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassExtraRepository::class)]
  7. class Extra extends  Product
  8. {
  9.     #[ORM\Column(length255)]
  10.     private ?string $name null;
  11.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  12.     private ?string $description null;
  13.     #[ORM\Column]
  14.     private ?float $minPrice null;
  15.     #[ORM\Column]
  16.     private ?bool $active null;
  17.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  18.     private ?\DateTimeInterface $expireDate null;
  19.     #[ORM\ManyToOne]
  20.     private ?ExtraType $extraType null;
  21.     public function getName(): ?string
  22.     {
  23.         return $this->name;
  24.     }
  25.     public function setName(string $name): static
  26.     {
  27.         $this->name $name;
  28.         return $this;
  29.     }
  30.     public function getDescription(): ?string
  31.     {
  32.         return $this->description;
  33.     }
  34.     public function setDescription(string $description): static
  35.     {
  36.         $this->description $description;
  37.         return $this;
  38.     }
  39.     public function getMinPrice(): ?float
  40.     {
  41.         return $this->minPrice;
  42.     }
  43.     public function setMinPrice(float $minPrice): static
  44.     {
  45.         $this->minPrice $minPrice;
  46.         return $this;
  47.     }
  48.     public function __toString(): string
  49.     {
  50.         return $this->name;
  51.     }
  52.     public function getClass()  : string {
  53.         return "Extra";
  54.     }
  55.     public function getIcon(): string
  56.     {
  57.         return "fe-box";
  58.     }
  59.     public function isActive(): ?bool
  60.     {
  61.         return $this->active;
  62.     }
  63.     public function setActive(bool $active): static
  64.     {
  65.         $this->active $active;
  66.         return $this;
  67.     }
  68.     public function getExpireDate(): ?\DateTimeInterface
  69.     {
  70.         return $this->expireDate;
  71.     }
  72.     public function setExpireDate(\DateTimeInterface $expireDate): static
  73.     {
  74.         $this->expireDate $expireDate;
  75.         return $this;
  76.     }
  77.     public function getExtraType(): ?ExtraType
  78.     {
  79.         return $this->extraType;
  80.     }
  81.     public function setExtraType(?ExtraType $extraType): static
  82.     {
  83.         $this->extraType $extraType;
  84.         return $this;
  85.     }
  86. }