src/Entity/ContactInvestissementImmoProperty.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ContactInvestissementImmoPropertyRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassContactInvestissementImmoPropertyRepository::class)]
  8. class ContactInvestissementImmoProperty
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'string'length255)]
  15.     private $surface;
  16.     #[ORM\Column(type'string'length255)]
  17.     private $biens;
  18.     #[ORM\Column(type'string'length255)]
  19.     private $rents;
  20.     #[ORM\ManyToOne(targetEntityContactInvestissementImmo::class, inversedBy'properties')]
  21.     private $contactInvestissementImmo;
  22.     #[ORM\OneToMany(mappedBy'contactInvestissementImmoProperty'targetEntityContactInvestissementImmoPropertyCharge::class)]
  23.     private $charges;
  24.     public function __construct()
  25.     {
  26.         $this->charges = new ArrayCollection();
  27.     }
  28.     public function getId(): ?int
  29.     {
  30.         return $this->id;
  31.     }
  32.     public function getSurface(): ?string
  33.     {
  34.         return $this->surface;
  35.     }
  36.     public function setSurface(string $surface): self
  37.     {
  38.         $this->surface $surface;
  39.         return $this;
  40.     }
  41.     public function getBiens(): ?string
  42.     {
  43.         return $this->biens;
  44.     }
  45.     public function setBiens(string $biens): self
  46.     {
  47.         $this->biens $biens;
  48.         return $this;
  49.     }
  50.     public function getRents(): ?string
  51.     {
  52.         return $this->rents;
  53.     }
  54.     public function setRents(string $rents): self
  55.     {
  56.         $this->rents $rents;
  57.         return $this;
  58.     }
  59.     public function getContactInvestissementImmo(): ?ContactInvestissementImmo
  60.     {
  61.         return $this->contactInvestissementImmo;
  62.     }
  63.     public function setContactInvestissementImmo(?ContactInvestissementImmo $contactInvestissementImmo): self
  64.     {
  65.         $this->contactInvestissementImmo $contactInvestissementImmo;
  66.         return $this;
  67.     }
  68.     /**
  69.      * @return Collection<int, ContactInvestissementImmoPropertyCharge>
  70.      */
  71.     public function getCharges(): Collection
  72.     {
  73.         return $this->charges;
  74.     }
  75.     public function addCharge(ContactInvestissementImmoPropertyCharge $charge): self
  76.     {
  77.         if (!$this->charges->contains($charge)) {
  78.             $this->charges[] = $charge;
  79.             $charge->setContactInvestissementImmoProperty($this);
  80.         }
  81.         return $this;
  82.     }
  83.     public function removeCharge(ContactInvestissementImmoPropertyCharge $charge): self
  84.     {
  85.         if ($this->charges->removeElement($charge)) {
  86.             // set the owning side to null (unless already changed)
  87.             if ($charge->getContactInvestissementImmoProperty() === $this) {
  88.                 $charge->setContactInvestissementImmoProperty(null);
  89.             }
  90.         }
  91.         return $this;
  92.     }
  93. }