*/ #[ORM\OneToMany( targetEntity: IntangibleDiscountDetail::class, mappedBy: 'intangiblePriceAndDiscount', cascade: ['persist'], orphanRemoval: true )] private Collection $intangibleDiscountDetails; #[ORM\OneToOne(targetEntity: Intangible::class, mappedBy: 'intangiblePriceAndDiscount', cascade: [])] protected ?Intangible $intangible; #[ORM\ManyToOne(targetEntity: FamilyQuotientModel::class, cascade: [], inversedBy: 'intangiblePriceAndDiscounts')] #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')] protected ?FamilyQuotientModel $familyQuotientModel; public function __construct() { $this->intangibleDiscountDetails = new ArrayCollection(); } public function getId(): ?int { return $this->id; } /** * @return Collection */ public function getIntangibleDiscountDetails(): Collection { return $this->intangibleDiscountDetails; } public function addIntangibleDiscountDetail(IntangibleDiscountDetail $intangibleDiscountDetail): self { if (!$this->intangibleDiscountDetails->contains($intangibleDiscountDetail)) { $this->intangibleDiscountDetails[] = $intangibleDiscountDetail; $intangibleDiscountDetail->setIntangiblePriceAndDiscount($this); } return $this; } public function removeIntangibleDiscountDetail(IntangibleDiscountDetail $intangibleDiscountDetail): self { if ($this->intangibleDiscountDetails->removeElement($intangibleDiscountDetail)) { // set the owning side to null (unless already changed) if ($intangibleDiscountDetail->getIntangiblePriceAndDiscount() === $this) { $intangibleDiscountDetail->setIntangiblePriceAndDiscount(null); } } return $this; } public function getIntangible(): ?Intangible { return $this->intangible; } public function setIntangible(?Intangible $intangible): self { $this->intangible = $intangible; return $this; } public function getFamilyQuotientModel(): ?FamilyQuotientModel { return $this->familyQuotientModel; } public function setFamilyQuotientModel(?FamilyQuotientModel $familyQuotientModel): self { $this->familyQuotientModel = $familyQuotientModel; return $this; } }