<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\PaysRepository")
*/
class Pays
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $nompays;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $tva;
/**
* @ORM\Column(type="string", length=255)
*/
private $capital;
/**
* @ORM\Column(type="string", length=255)
*/
private $monnaie_code;
/**
* @ORM\Column(type="string", length=255)
*/
private $monnaie_nom;
/**
* @ORM\Column(type="string", length=255)
*/
private $indicatif;
/**
* @ORM\Column(type="string", length=255)
*/
private $iso_code2;
/**
* @ORM\Column(type="string", length=255)
*/
private $iso_code3;
/**
* @ORM\Column(type="string", length=255)
*/
private $iso_number;
/**
* @ORM\Column(type="string", length=255)
*/
private $ltd;
/**
* @ORM\OneToMany(targetEntity="App\Entity\User", mappedBy="pays")
*/
private $users;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Zone", inversedBy="pays")
* @ORM\JoinColumn(nullable=false)
*/
private $zone;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Evenement", mappedBy="pays", orphanRemoval=true)
*/
private $evenements;
public function __construct()
{
$this->pays_users = new ArrayCollection();
$this->users = new ArrayCollection();
$this->evenements = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNompays(): ?string
{
return $this->nompays;
}
public function setNompays(string $nompays): self
{
$this->nompays = $nompays;
return $this;
}
public function getTva(): ?string
{
return $this->tva;
}
public function setTva(?string $tva): self
{
$this->tva = $tva;
return $this;
}
public function getCapital(): ?string
{
return $this->capital;
}
public function setCapital(string $capital): self
{
$this->capital = $capital;
return $this;
}
public function getMonnaieCode(): ?string
{
return $this->monnaie_code;
}
public function setMonnaieCode(string $monnaie_code): self
{
$this->monnaie_code = $monnaie_code;
return $this;
}
public function getMonnaieNom(): ?string
{
return $this->monnaie_nom;
}
public function setMonnaieNom(string $monnaie_nom): self
{
$this->monnaie_nom = $monnaie_nom;
return $this;
}
public function getIndicatif(): ?string
{
return $this->indicatif;
}
public function setIndicatif(string $indicatif): self
{
$this->indicatif = $indicatif;
return $this;
}
public function getIsoCode2(): ?string
{
return $this->iso_code2;
}
public function setIsoCode2(string $iso_code2): self
{
$this->iso_code2 = $iso_code2;
return $this;
}
public function getIsoCode3(): ?string
{
return $this->iso_code3;
}
public function setIsoCode3(string $iso_code3): self
{
$this->iso_code3 = $iso_code3;
return $this;
}
public function getIsoNumber(): ?string
{
return $this->iso_number;
}
public function setIsoNumber(string $iso_number): self
{
$this->iso_number = $iso_number;
return $this;
}
public function getLtd(): ?string
{
return $this->ltd;
}
public function setLtd(string $ltd): self
{
$this->ltd = $ltd;
return $this;
}
/**
* @return Collection|User[]
*/
public function getUsers(): Collection
{
return $this->users;
}
public function addUser(User $user): self
{
if (!$this->users->contains($user)) {
$this->users[] = $user;
$user->setPays($this);
}
return $this;
}
public function removeUser(User $user): self
{
if ($this->users->contains($user)) {
$this->users->removeElement($user);
// set the owning side to null (unless already changed)
if ($user->getPays() === $this) {
$user->setPays(null);
}
}
return $this;
}
public function getZone(): ?zone
{
return $this->zone;
}
public function setZone(?zone $zone): self
{
$this->zone = $zone;
return $this;
}
/**
* @return Collection|Evenement[]
*/
public function getEvenements(): Collection
{
return $this->evenements;
}
public function addEvenement(Evenement $evenement): self
{
if (!$this->evenements->contains($evenement)) {
$this->evenements[] = $evenement;
$evenement->setPays($this);
}
return $this;
}
public function removeEvenement(Evenement $evenement): self
{
if ($this->evenements->contains($evenement)) {
$this->evenements->removeElement($evenement);
// set the owning side to null (unless already changed)
if ($evenement->getPays() === $this) {
$evenement->setPays(null);
}
}
return $this;
}
}