src/Entity/Tax.php line 11
<?phpnamespace App\Entity;use App\Repository\TaxRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: TaxRepository::class)]class Tax{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $name = null;#[ORM\Column]private ?float $value = null;#[ORM\OneToMany(mappedBy: 'tax', targetEntity: AddOn::class)]private Collection $addOns;public function __construct(){$this->addOns = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getName(): ?string{return $this->name;}public function setName(string $name): self{$this->name = $name;return $this;}public function getValue(): ?float{return $this->value;}public function setValue(float $value): self{$this->value = $value;return $this;}/*** @return Collection<int, AddOn>*/public function getAddOns(): Collection{return $this->addOns;}public function addAddOn(AddOn $addOn): self{if (!$this->addOns->contains($addOn)) {$this->addOns->add($addOn);$addOn->setTax($this);}return $this;}public function removeAddOn(AddOn $addOn): self{if ($this->addOns->removeElement($addOn)) {// set the owning side to null (unless already changed)if ($addOn->getTax() === $this) {$addOn->setTax(null);}}return $this;}}