src/Entity/Extra.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ExtraRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassExtraRepository::class)]
  9. class Extra extends Product
  10. {
  11.     #[ORM\ManyToMany(targetEntityCountry::class)]
  12.     private Collection $availableCountries;
  13.     #[ORM\Column(length255)]
  14.     private ?string $name null;
  15.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  16.     private ?string $description null;
  17.     #[ORM\Column(nullabletrue)]
  18.     private ?float $minPrice null;
  19.     #[ORM\Column]
  20.     private ?bool $active null;
  21.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  22.     private ?\DateTimeInterface $expireDate null;
  23.     #[ORM\ManyToOne]
  24.     private ?ExtraType $extraType null;
  25.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  26.     private ?string $program null;
  27.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  28.     private ?string $included null;
  29.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  30.     private ?string $excluded null;
  31.     #[ORM\Column(length255nullabletrue)]
  32.     private ?string $pricingNotes null;
  33.     #[ORM\Column(length255nullabletrue)]
  34.     private ?string $subTitle null;
  35.     #[ORM\Column(length255nullabletrue)]
  36.     private ?string $url null;
  37.     public function __construct()
  38.     {
  39.         parent::__construct();
  40.         $this->availableCountries = new ArrayCollection();
  41.     }
  42.     public function getName(): ?string
  43.     {
  44.         return $this->name;
  45.     }
  46.     public function setName(string $name): static
  47.     {
  48.         $this->name $name;
  49.         return $this;
  50.     }
  51.     public function getDescription(): ?string
  52.     {
  53.         return $this->description;
  54.     }
  55.     public function setDescription(string $description): static
  56.     {
  57.         $this->description $description;
  58.         return $this;
  59.     }
  60.     public function getMinPrice(): ?float
  61.     {
  62.         return $this->minPrice;
  63.     }
  64.     public function setMinPrice(float $minPrice): static
  65.     {
  66.         $this->minPrice $minPrice;
  67.         return $this;
  68.     }
  69.     public function __toString(): string
  70.     {
  71.         return $this->name;
  72.     }
  73.     public function getClass(): string
  74.     {
  75.         return "Extra";
  76.     }
  77.     public function getIcon(): string
  78.     {
  79.         return "fe-box";
  80.     }
  81.     public function isActive(): ?bool
  82.     {
  83.         return $this->active;
  84.     }
  85.     public function setActive(bool $active): static
  86.     {
  87.         $this->active $active;
  88.         return $this;
  89.     }
  90.     public function getExpireDate(): ?\DateTimeInterface
  91.     {
  92.         return $this->expireDate;
  93.     }
  94.     public function setExpireDate(\DateTimeInterface $expireDate): static
  95.     {
  96.         $this->expireDate $expireDate;
  97.         return $this;
  98.     }
  99.     public function getExtraType(): ?ExtraType
  100.     {
  101.         return $this->extraType;
  102.     }
  103.     public function setExtraType(?ExtraType $extraType): static
  104.     {
  105.         $this->extraType $extraType;
  106.         return $this;
  107.     }
  108.     /**
  109.      * @return Collection<int, Country>
  110.      */
  111.     public function getAvailableCountries(): Collection
  112.     {
  113.         return $this->availableCountries;
  114.     }
  115.     public function addAvailableCountry(Country $availableCountry): static
  116.     {
  117.         if (!$this->availableCountries->contains($availableCountry)) {
  118.             $this->availableCountries->add($availableCountry);
  119.         }
  120.         return $this;
  121.     }
  122.     public function removeAvailableCountry(Country $availableCountry): static
  123.     {
  124.         $this->availableCountries->removeElement($availableCountry);
  125.         return $this;
  126.     }
  127.     public function getProgram(): ?string
  128.     {
  129.         return $this->program;
  130.     }
  131.     public function setProgram(?string $program): static
  132.     {
  133.         $this->program $program;
  134.         return $this;
  135.     }
  136.     public function getIncluded(): ?string
  137.     {
  138.         return $this->included;
  139.     }
  140.     public function setIncluded(?string $included): static
  141.     {
  142.         $this->included $included;
  143.         return $this;
  144.     }
  145.     public function getExcluded(): ?string
  146.     {
  147.         return $this->excluded;
  148.     }
  149.     public function setExcluded(?string $excluded): static
  150.     {
  151.         $this->excluded $excluded;
  152.         return $this;
  153.     }
  154.     public function getPricingNotes(): ?string
  155.     {
  156.         return $this->pricingNotes;
  157.     }
  158.     public function setPricingNotes(?string $pricingNotes): static
  159.     {
  160.         $this->pricingNotes $pricingNotes;
  161.         return $this;
  162.     }
  163.     public function getSubTitle(): ?string
  164.     {
  165.         return $this->subTitle;
  166.     }
  167.     public function setSubTitle(?string $subTitle): static
  168.     {
  169.         $this->subTitle $subTitle;
  170.         return $this;
  171.     }
  172.     public function getUrl(): ?string
  173.     {
  174.         return $this->url;
  175.     }
  176.     public function setUrl(?string $url): static
  177.     {
  178.         $this->url $url;
  179.         return $this;
  180.     }
  181. }