<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
*/
class CompanySalesPriceGroup extends PriceGroup
{
/**
* @ORM\OneToMany(
* targetEntity="Company",
* mappedBy="priceGroup",
* cascade={"persist","remove"}
* )
* @orm\OrderBy({"name" = "ASC"})
*
* @var Collection<Company>
*/
protected $companies;
/**
* @param string $name
* @param string $label
* @param string $currency
*/
public function __construct(string $name, string $label, string $currency)
{
parent::__construct($name, $label, $currency);
$this->companies = new ArrayCollection();
}
/**
* @return Collection<Company>
*/
public function getCompanies(): Collection
{
return $this->companies;
}
}