<?php
namespace App\Entity;
use App\Repository\RevenueFamilialeRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: RevenueFamilialeRepository::class)]
class RevenueFamiliale
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $Revenue = null;
#[ORM\OneToMany(mappedBy: 'revenueFamiliale', targetEntity: Membre::class)]
private Collection $membres;
public function __construct()
{
$this->membres = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getRevenue(): ?string
{
return $this->Revenue;
}
public function setRevenue(?string $Revenue): static
{
$this->Revenue = $Revenue;
return $this;
}
/**
* @return Collection<int, Membre>
*/
public function getMembres(): Collection
{
return $this->membres;
}
public function addMembre(Membre $membre): static
{
if (!$this->membres->contains($membre)) {
$this->membres->add($membre);
$membre->setRevenueFamiliale($this);
}
return $this;
}
public function removeMembre(Membre $membre): static
{
if ($this->membres->removeElement($membre)) {
// set the owning side to null (unless already changed)
if ($membre->getRevenueFamiliale() === $this) {
$membre->setRevenueFamiliale(null);
}
}
return $this;
}
}