Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
proc
/
212
/
root
/
proc
/
212
/
root
/
proc
/
self
/
root
/
proc
/
self
/
root
/
proc
/
70528
/
cwd
/
src
/
Entity
/
//proc/212/root/proc/212/root/proc/self/root/proc/self/root/proc/70528/cwd/src/Entity/Price.php
<?php namespace App\Entity; use App\Repository\PriceRepository; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass=PriceRepository::class) */ class Price { /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=Product::class, inversedBy="prices") * @ORM\JoinColumn(nullable=false) */ private $product; /** * @ORM\ManyToOne(targetEntity=Color::class, inversedBy="prices") */ private $color; /** * @ORM\ManyToOne(targetEntity=Fold::class, inversedBy="prices") */ private $fold; /** * @ORM\ManyToOne(targetEntity=Finishing::class, inversedBy="prices") */ private $finishing; /** * @ORM\ManyToOne(targetEntity=Page::class, inversedBy="prices") */ private $page; /** * @ORM\ManyToOne(targetEntity=Quantity::class, inversedBy="prices") * @ORM\JoinColumn(nullable=false) */ private $quantity; /** * @ORM\Column(type="float") */ private $price; /** * @ORM\ManyToOne(targetEntity=Size::class, inversedBy="prices") * @ORM\JoinColumn(nullable=false) */ private $size; /** * @ORM\ManyToOne(targetEntity=Grammage::class, inversedBy="prices") * @ORM\JoinColumn(nullable=false) */ private $grammage; /** * @ORM\OneToMany(targetEntity=CartItem::class, mappedBy="price") */ private $cartItems; /** * @ORM\Column(type="boolean") */ private $active; public function __construct() { $this->cartItems = new ArrayCollection(); $this->active = true; } public function getId(): ?int { return $this->id; } public function getProduct(): ?Product { return $this->product; } public function setProduct(?Product $product): self { $this->product = $product; return $this; } public function getColor(): ?Color { return $this->color; } public function setColor(?Color $color): self { $this->color = $color; return $this; } public function getFold(): ?Fold { return $this->fold; } public function setFold(?Fold $fold): self { $this->fold = $fold; return $this; } public function getFinishing(): ?Finishing { return $this->finishing; } public function setFinishing(?Finishing $finishing): self { $this->finishing = $finishing; return $this; } public function getPage(): ?Page { return $this->page; } public function setPage(?Page $page): self { $this->page = $page; return $this; } public function getQuantity(): ?Quantity { return $this->quantity; } public function setQuantity(?Quantity $quantity): self { $this->quantity = $quantity; return $this; } public function getPrice(): ?float { return $this->price; } public function setPrice(float $price): self { $this->price = $price; return $this; } public function getSize(): ?Size { return $this->size; } public function setSize(?Size $size): self { $this->size = $size; return $this; } public function getGrammage(): ?Grammage { return $this->grammage; } public function setGrammage(?Grammage $grammage): self { $this->grammage = $grammage; return $this; } /** * @return Collection<int, CartItem> */ public function getCartItems(): Collection { return $this->cartItems; } public function addCartItem(CartItem $cartItem): self { if (!$this->cartItems->contains($cartItem)) { $this->cartItems[] = $cartItem; $cartItem->setPrice($this); } return $this; } public function removeCartItem(CartItem $cartItem): self { if ($this->cartItems->removeElement($cartItem)) { // set the owning side to null (unless already changed) if ($cartItem->getPrice() === $this) { $cartItem->setPrice(null); } } return $this; } public function isActive(): ?bool { return $this->active; } public function setActive(?bool $active): self { $this->active = $active; return $this; } }