src/Entity/PartyZone.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PartyZoneRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. #[ORM\Entity(repositoryClassPartyZoneRepository::class)]
  7. class PartyZone extends ProductElement
  8. {
  9.     #[ORM\Column(nullabletrue)]
  10.     #[Assert\Positive]
  11.     private ?float $childSalePrice null;
  12.     #[ORM\Column(nullabletrue)]
  13.     #[Assert\Positive]
  14.     private ?float $childPurchasePrice null;
  15.     #[ORM\Column(nullabletrue)]
  16.     #[Assert\Positive]
  17.     private ?float $adultSalePrice null;
  18.     #[ORM\Column(nullabletrue)]
  19.     #[Assert\Positive]
  20.     private ?float $adultPurchasePrice null;
  21.     #[ORM\ManyToOne]
  22.     #[ORM\JoinColumn(nullablefalse)]
  23.     private ?Zone $zone null;
  24.     #[ORM\ManyToOne(targetEntityParty::class, inversedBy'zones')]
  25.     #[ORM\JoinColumn(nullablefalse)]
  26.     private ?Party $party null;
  27.     public function getParty(): ?Party
  28.     {
  29.         return $this->party;
  30.     }
  31.     public function setParty(?Party $party): self
  32.     {
  33.         $this->party $party;
  34.         return $this;
  35.     }
  36.     public function getZone(): ?Zone
  37.     {
  38.         return $this->zone;
  39.     }
  40.     public function setZone(?Zone $zone): self
  41.     {
  42.         $this->zone $zone;
  43.         return $this;
  44.     }
  45.     /**
  46.      * @return float|null
  47.      */
  48.     public function getAdultPurchasePrice(): ?float
  49.     {
  50.         return $this->adultPurchasePrice;
  51.     }
  52.     /**
  53.      * @return float|null
  54.      */
  55.     public function getAdultSalePrice(): ?float
  56.     {
  57.         return $this->adultSalePrice;
  58.     }
  59.     /**
  60.      * @return float|null
  61.      */
  62.     public function getChildPurchasePrice(): ?float
  63.     {
  64.         return $this->childPurchasePrice;
  65.     }
  66.     /**
  67.      * @return float|null
  68.      */
  69.     public function getChildSalePrice(): ?float
  70.     {
  71.         return $this->childSalePrice;
  72.     }
  73.     /**
  74.      * @param float|null $adultPurchasePrice
  75.      */
  76.     public function setAdultPurchasePrice(?float $adultPurchasePrice): void
  77.     {
  78.         $this->adultPurchasePrice $adultPurchasePrice;
  79.     }
  80.     /**
  81.      * @param float|null $adultSalePrice
  82.      */
  83.     public function setAdultSalePrice(?float $adultSalePrice): void
  84.     {
  85.         $this->adultSalePrice $adultSalePrice;
  86.     }
  87.     /**
  88.      * @param float|null $childPurchasePrice
  89.      */
  90.     public function setChildPurchasePrice(?float $childPurchasePrice): void
  91.     {
  92.         $this->childPurchasePrice $childPurchasePrice;
  93.     }
  94.     /**
  95.      * @param float|null $childSalePrice
  96.      */
  97.     public function setChildSalePrice(?float $childSalePrice): void
  98.     {
  99.         $this->childSalePrice $childSalePrice;
  100.     }
  101.     public function __toString(): string
  102.     {
  103.         return $this->getZone()->getTitle();
  104.     }
  105. }