<?php
namespace App\Entity;
use App\Repository\CoordonnescircuitRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CoordonnescircuitRepository::class)
*/
class Coordonnescircuit
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Villes::class, inversedBy="coordonnescircuits")
* @ORM\JoinColumn(nullable=false)
*/
private $ville;
/**
* @ORM\ManyToOne(targetEntity=Pays::class, inversedBy="coordonnescircuits")
* @ORM\JoinColumn(nullable=false)
*/
private $pays;
/**
* @ORM\ManyToOne(targetEntity=Circuit::class, inversedBy="coordonnescircuits")
* @ORM\JoinColumn(nullable=false)
*/
private $circuit;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $nom;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $prenom;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $email;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $mobile;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $civilite;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $cin;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $addresse;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $cp;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $nbad;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $nbenf;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $nbbebe;
/**
* @ORM\OneToMany(targetEntity=Reservationcircuit::class, mappedBy="coordonnee", orphanRemoval=true)
*/
private $reservationcircuits;
public function __construct()
{
$this->reservationcircuits = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getVille(): ?Villes
{
return $this->ville;
}
public function setVille(?Villes $ville): self
{
$this->ville = $ville;
return $this;
}
public function getPays(): ?Pays
{
return $this->pays;
}
public function setPays(?Pays $pays): self
{
$this->pays = $pays;
return $this;
}
public function getCircuit(): ?Circuit
{
return $this->circuit;
}
public function setCircuit(?Circuit $circuit): self
{
$this->circuit = $circuit;
return $this;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(?string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getPrenom(): ?string
{
return $this->prenom;
}
public function setPrenom(?string $prenom): self
{
$this->prenom = $prenom;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getMobile(): ?string
{
return $this->mobile;
}
public function setMobile(?string $mobile): self
{
$this->mobile = $mobile;
return $this;
}
public function getCivilite(): ?string
{
return $this->civilite;
}
public function setCivilite(?string $civilite): self
{
$this->civilite = $civilite;
return $this;
}
public function getCin(): ?string
{
return $this->cin;
}
public function setCin(?string $cin): self
{
$this->cin = $cin;
return $this;
}
public function getAddresse(): ?string
{
return $this->addresse;
}
public function setAddresse(?string $addresse): self
{
$this->addresse = $addresse;
return $this;
}
public function getCp(): ?string
{
return $this->cp;
}
public function setCp(?string $cp): self
{
$this->cp = $cp;
return $this;
}
public function getNbad(): ?int
{
return $this->nbad;
}
public function setNbad(?int $nbad): self
{
$this->nbad = $nbad;
return $this;
}
public function getNbenf(): ?int
{
return $this->nbenf;
}
public function setNbenf(?int $nbenf): self
{
$this->nbenf = $nbenf;
return $this;
}
public function getNbbebe(): ?int
{
return $this->nbbebe;
}
public function setNbbebe(?int $nbbebe): self
{
$this->nbbebe = $nbbebe;
return $this;
}
/**
* @return Collection<int, Reservationcircuit>
*/
public function getReservationcircuits(): Collection
{
return $this->reservationcircuits;
}
public function addReservationcircuit(Reservationcircuit $reservationcircuit): self
{
if (!$this->reservationcircuits->contains($reservationcircuit)) {
$this->reservationcircuits[] = $reservationcircuit;
$reservationcircuit->setCoordonnee($this);
}
return $this;
}
public function removeReservationcircuit(Reservationcircuit $reservationcircuit): self
{
if ($this->reservationcircuits->removeElement($reservationcircuit)) {
// set the owning side to null (unless already changed)
if ($reservationcircuit->getCoordonnee() === $this) {
$reservationcircuit->setCoordonnee(null);
}
}
return $this;
}
}