<?php
namespace App\Entity;
use App\Repository\ChretiensRepository;
use App\Traits\TimeStampTraits;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ChretiensRepository::class)]
#[ORM\HasLifecycleCallbacks]
class Chretiens
{
use TimeStampTraits;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 250)]
private ?string $nom = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $prenom = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $dateNaissance = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $lieuDeNaissance = null;
#[ORM\Column(length: 10)]
private ?string $sexe = null;
#[ORM\Column(length: 20, nullable: true)]
private ?string $telephone = null;
#[ORM\Column(length: 20, nullable: true)]
private ?string $telephoneSecondaire = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $email = null;
#[ORM\Column]
private ?bool $isBaptise = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $commentaire = null;
#[ORM\OneToMany(mappedBy: 'chretien', targetEntity: ChretienFonctions::class, orphanRemoval: true)]
private Collection $chretienFonctions;
#[ORM\OneToMany(mappedBy: 'chretien', targetEntity: ChoraleMembres::class, orphanRemoval: true)]
private Collection $choraleMembres;
#[ORM\Column(length: 255)]
private ?string $adresse = null;
#[ORM\OneToMany(mappedBy: 'chretien', targetEntity: FamilleMembre::class, orphanRemoval: true)]
private Collection $familleMembres;
#[ORM\OneToMany(mappedBy: 'chretien', targetEntity: Entrees::class)]
private Collection $entrees;
#[ORM\OneToMany(mappedBy: 'chretien', targetEntity: ConfigurationDonReconnaissance::class)]
private Collection $configurationDonReconnaissances;
#[ORM\OneToMany(mappedBy: 'chretien', targetEntity: CaisseCampAdolescents::class, orphanRemoval: true)]
private Collection $caisseCampAdolescents;
#[ORM\ManyToOne(inversedBy: 'chretiens')]
#[ORM\JoinColumn(nullable: false)]
private ?Annexe $annexe = null;
public function __construct()
{
$this->chretienFonctions = new ArrayCollection();
$this->choraleMembres = new ArrayCollection();
$this->familleMembres = new ArrayCollection();
$this->entrees = new ArrayCollection();
$this->configurationDonReconnaissances = new ArrayCollection();
$this->caisseCampAdolescents = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(string $nom): static
{
$this->nom = $nom;
return $this;
}
public function getPrenom(): ?string
{
return $this->prenom;
}
public function setPrenom(?string $prenom): static
{
$this->prenom = $prenom;
return $this;
}
public function getDateNaissance(): ?\DateTimeInterface
{
return $this->dateNaissance;
}
public function setDateNaissance(?\DateTimeInterface $dateNaissance): static
{
$this->dateNaissance = $dateNaissance;
return $this;
}
public function getlieuDeNaissance(): ?string
{
return $this->lieuDeNaissance;
}
public function setlieuDeNaissance(?string $lieuDeNaissance): static
{
$this->lieuDeNaissance = $lieuDeNaissance;
return $this;
}
public function getSexe(): ?string
{
return $this->sexe;
}
public function setSexe(string $sexe): static
{
$this->sexe = $sexe;
return $this;
}
public function getTelephone(): ?string
{
return $this->telephone;
}
public function setTelephone(?string $telephone): static
{
$this->telephone = $telephone;
return $this;
}
public function getTelephoneSecondaire(): ?string
{
return $this->telephoneSecondaire;
}
public function setTelephoneSecondaire(?string $telephoneSecondaire): static
{
$this->telephoneSecondaire = $telephoneSecondaire;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): static
{
$this->email = $email;
return $this;
}
public function isIsBaptise(): ?bool
{
return $this->isBaptise;
}
public function setIsBaptise(bool $isBaptise): static
{
$this->isBaptise = $isBaptise;
return $this;
}
public function getCommentaire(): ?string
{
return $this->commentaire;
}
public function setCommentaire(?string $commentaire): static
{
$this->commentaire = $commentaire;
return $this;
}
/**
* @return Collection<int, ChretienFonctions>
*/
public function getChretienFonctions(): Collection
{
return $this->chretienFonctions;
}
public function addChretienFonction(ChretienFonctions $chretienFonction): static
{
if (!$this->chretienFonctions->contains($chretienFonction)) {
$this->chretienFonctions->add($chretienFonction);
$chretienFonction->setChretien($this);
}
return $this;
}
public function removeChretienFonction(ChretienFonctions $chretienFonction): static
{
if ($this->chretienFonctions->removeElement($chretienFonction)) {
// set the owning side to null (unless already changed)
if ($chretienFonction->getChretien() === $this) {
$chretienFonction->setChretien(null);
}
}
return $this;
}
/**
* @return Collection<int, ChoraleMembres>
*/
public function getChoraleMembres(): Collection
{
return $this->choraleMembres;
}
public function addChoraleMembre(ChoraleMembres $choraleMembre): static
{
if (!$this->choraleMembres->contains($choraleMembre)) {
$this->choraleMembres->add($choraleMembre);
$choraleMembre->setChretien($this);
}
return $this;
}
public function removeChoraleMembre(ChoraleMembres $choraleMembre): static
{
if ($this->choraleMembres->removeElement($choraleMembre)) {
// set the owning side to null (unless already changed)
if ($choraleMembre->getChretien() === $this) {
$choraleMembre->setChretien(null);
}
}
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(string $adresse): static
{
$this->adresse = $adresse;
return $this;
}
/**
* @return Collection<int, FamilleMembre>
*/
public function getFamilleMembres(): Collection
{
return $this->familleMembres;
}
public function addFamilleMembre(FamilleMembre $familleMembre): static
{
if (!$this->familleMembres->contains($familleMembre)) {
$this->familleMembres->add($familleMembre);
$familleMembre->setChretien($this);
}
return $this;
}
public function removeFamilleMembre(FamilleMembre $familleMembre): static
{
if ($this->familleMembres->removeElement($familleMembre)) {
// set the owning side to null (unless already changed)
if ($familleMembre->getChretien() === $this) {
$familleMembre->setChretien(null);
}
}
return $this;
}
/**
* @return Collection<int, Entrees>
*/
public function getEntrees(): Collection
{
return $this->entrees;
}
public function addEntree(Entrees $entree): static
{
if (!$this->entrees->contains($entree)) {
$this->entrees->add($entree);
$entree->setChretien($this);
}
return $this;
}
public function removeEntree(Entrees $entree): static
{
if ($this->entrees->removeElement($entree)) {
// set the owning side to null (unless already changed)
if ($entree->getChretien() === $this) {
$entree->setChretien(null);
}
}
return $this;
}
/**
* @return Collection<int, ConfigurationDonReconnaissance>
*/
public function getConfigurationDonReconnaissances(): Collection
{
return $this->configurationDonReconnaissances;
}
public function addConfigurationDonReconnaissance(ConfigurationDonReconnaissance $configurationDonReconnaissance): static
{
if (!$this->configurationDonReconnaissances->contains($configurationDonReconnaissance)) {
$this->configurationDonReconnaissances->add($configurationDonReconnaissance);
$configurationDonReconnaissance->setChretien($this);
}
return $this;
}
public function removeConfigurationDonReconnaissance(ConfigurationDonReconnaissance $configurationDonReconnaissance): static
{
if ($this->configurationDonReconnaissances->removeElement($configurationDonReconnaissance)) {
// set the owning side to null (unless already changed)
if ($configurationDonReconnaissance->getChretien() === $this) {
$configurationDonReconnaissance->setChretien(null);
}
}
return $this;
}
/**
* @return Collection<int, CaisseCampAdolescents>
*/
public function getCaisseCampAdolescents(): Collection
{
return $this->caisseCampAdolescents;
}
public function addCaisseCampAdolescent(CaisseCampAdolescents $caisseCampAdolescent): static
{
if (!$this->caisseCampAdolescents->contains($caisseCampAdolescent)) {
$this->caisseCampAdolescents->add($caisseCampAdolescent);
$caisseCampAdolescent->setChretien($this);
}
return $this;
}
public function removeCaisseCampAdolescent(CaisseCampAdolescents $caisseCampAdolescent): static
{
if ($this->caisseCampAdolescents->removeElement($caisseCampAdolescent)) {
// set the owning side to null (unless already changed)
if ($caisseCampAdolescent->getChretien() === $this) {
$caisseCampAdolescent->setChretien(null);
}
}
return $this;
}
public function getAnnexe(): ?Annexe
{
return $this->annexe;
}
public function setAnnexe(?Annexe $annexe): static
{
$this->annexe = $annexe;
return $this;
}
}