src/Entity/CompanySalesPriceGroup.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity
  8.  */
  9. class CompanySalesPriceGroup extends PriceGroup
  10. {
  11.     /**
  12.      * @ORM\OneToMany(
  13.      *     targetEntity="Company",
  14.      *     mappedBy="priceGroup",
  15.      *     cascade={"persist","remove"}
  16.      * )
  17.      * @orm\OrderBy({"name" = "ASC"})
  18.      *
  19.      * @var Collection<Company>
  20.      */
  21.     protected $companies;
  22.     /**
  23.      * @param string $name
  24.      * @param string $label
  25.      * @param string $currency
  26.      */
  27.     public function __construct(string $namestring $labelstring $currency)
  28.     {
  29.         parent::__construct($name$label$currency);
  30.         $this->companies = new ArrayCollection();
  31.     }
  32.     /**
  33.      * @return Collection<Company>
  34.      */
  35.     public function getCompanies(): Collection
  36.     {
  37.         return $this->companies;
  38.     }
  39. }