*/ #[ORM\OneToMany(targetEntity: ResidenceArea::class, mappedBy: 'billingSetting', cascade: ['persist'], orphanRemoval: true)] private Collection $residenceAreas; #[ORM\Column(options: ['default' => false])] private bool $applyVat = false; /** @var Collection */ #[ORM\OneToMany(targetEntity: FamilyQuotient::class, mappedBy: 'billingSetting', cascade: ['persist'], orphanRemoval: true)] private Collection $familyQuotients; #[ORM\OneToOne(targetEntity: BillingSettingRent::class, mappedBy: 'billingSetting', cascade: ['persist', 'remove'])] protected ?BillingSettingRent $billingSettingRent; #[Pure] public function __construct() { $this->residenceAreas = new ArrayCollection(); $this->familyQuotients = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getOrganization(): Organization { return $this->organization; } public function setOrganization(Organization $organization): self { $this->organization = $organization; return $this; } public function getApplyVat(): bool { return $this->applyVat; } public function setApplyVat(bool $applyVat): self { $this->applyVat = $applyVat; return $this; } public function getResidenceAreas(): Collection { return $this->residenceAreas; } public function addResidenceArea(ResidenceArea $residenceArea): self { if (!$this->residenceAreas->contains($residenceArea)) { $this->residenceAreas[] = $residenceArea; $residenceArea->setBillingSetting($this); } return $this; } public function removeResidenceArea(ResidenceArea $residenceArea): self { if ($this->residenceAreas->removeElement($residenceArea)) { // set the owning side to null (unless already changed) if ($residenceArea->getBillingSetting() === $this) { $residenceArea->setBillingSetting(null); } } return $this; } /** * @return Collection */ public function getFamilyQuotients(): Collection { return $this->familyQuotients; } public function addFamilyQuotient(FamilyQuotient $familyQuotient): self { if (!$this->familyQuotients->contains($familyQuotient)) { $this->familyQuotients[] = $familyQuotient; $familyQuotient->setBillingSetting($this); } return $this; } public function removeFamilyQuotient(FamilyQuotient $familyQuotient): self { if ($this->familyQuotients->removeElement($familyQuotient)) { // set the owning side to null (unless already changed) if ($familyQuotient->getBillingSetting() === $this) { $familyQuotient->setBillingSetting(null); } } return $this; } public function getBillingSettingRent(): ?BillingSettingRent { return $this->billingSettingRent; } public function setBillingSettingRent(?BillingSettingRent $billingSettingRent): self { $this->billingSettingRent = $billingSettingRent; return $this; } }