*/ #[ORM\ManyToMany(targetEntity: GroupOfProducts::class, mappedBy: 'sellings')] private Collection $groupOfProducts; /** * @var Collection */ #[ORM\ManyToMany(targetEntity: Product::class, inversedBy: 'sellings')] private Collection $products; public function __construct() { $this->groupOfProducts = new ArrayCollection(); $this->products = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getNote(): ?string { return $this->note; } public function setNote(?string $note): static { $this->note = $note; return $this; } public function getProducts(): ?object { return $this->products; } public function setProducts(object $products): static { $this->products = $products; return $this; } public function getSum(): ?float { return $this->sum; } public function setSum(float $sum): static { $this->sum = $sum; return $this; } public function getReduction(): ?float { return $this->reduction; } public function setReduction(?float $reduction): static { $this->reduction = $reduction; return $this; } /** * @return Collection */ public function getGroupOfProducts(): Collection { return $this->groupOfProducts; } public function addGroupOfProduct(GroupOfProducts $groupOfProduct): static { if (!$this->groupOfProducts->contains($groupOfProduct)) { $this->groupOfProducts->add($groupOfProduct); $groupOfProduct->addSelling($this); } return $this; } public function removeGroupOfProduct(GroupOfProducts $groupOfProduct): static { if ($this->groupOfProducts->removeElement($groupOfProduct)) { $groupOfProduct->removeSelling($this); } return $this; } public function addProduct(Product $product): static { if (!$this->products->contains($product)) { $this->products->add($product); } return $this; } public function removeProduct(Product $product): static { $this->products->removeElement($product); return $this; } }