<?phpnamespace App\Entity;use App\Repository\ContactInvestissementImmoPropertyRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ContactInvestissementImmoPropertyRepository::class)]class ContactInvestissementImmoProperty{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[ORM\Column(type: 'string', length: 255)] private $surface; #[ORM\Column(type: 'string', length: 255)] private $biens; #[ORM\Column(type: 'string', length: 255)] private $rents; #[ORM\ManyToOne(targetEntity: ContactInvestissementImmo::class, inversedBy: 'properties')] private $contactInvestissementImmo; #[ORM\OneToMany(mappedBy: 'contactInvestissementImmoProperty', targetEntity: ContactInvestissementImmoPropertyCharge::class)] private $charges; public function __construct() { $this->charges = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getSurface(): ?string { return $this->surface; } public function setSurface(string $surface): self { $this->surface = $surface; return $this; } public function getBiens(): ?string { return $this->biens; } public function setBiens(string $biens): self { $this->biens = $biens; return $this; } public function getRents(): ?string { return $this->rents; } public function setRents(string $rents): self { $this->rents = $rents; return $this; } public function getContactInvestissementImmo(): ?ContactInvestissementImmo { return $this->contactInvestissementImmo; } public function setContactInvestissementImmo(?ContactInvestissementImmo $contactInvestissementImmo): self { $this->contactInvestissementImmo = $contactInvestissementImmo; return $this; } /** * @return Collection<int, ContactInvestissementImmoPropertyCharge> */ public function getCharges(): Collection { return $this->charges; } public function addCharge(ContactInvestissementImmoPropertyCharge $charge): self { if (!$this->charges->contains($charge)) { $this->charges[] = $charge; $charge->setContactInvestissementImmoProperty($this); } return $this; } public function removeCharge(ContactInvestissementImmoPropertyCharge $charge): self { if ($this->charges->removeElement($charge)) { // set the owning side to null (unless already changed) if ($charge->getContactInvestissementImmoProperty() === $this) { $charge->setContactInvestissementImmoProperty(null); } } return $this; }}