src\Entity\Pays.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClass\App\Repository\PaysRepository::class)]
  7. class Pays
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     private $id;
  13.     #[ORM\Column(type'string'length255)]
  14.     private $nompays;
  15.     #[ORM\Column(type'string'length255nullabletrue)]
  16.     private $tva;
  17.     #[ORM\Column(type'string'length255)]
  18.     private $capital;
  19.     #[ORM\Column(type'string'length255)]
  20.     private $monnaie_code;
  21.     #[ORM\Column(type'string'length255)]
  22.     private $monnaie_nom;
  23.     #[ORM\Column(type'string'length255)]
  24.     private $indicatif;
  25.     #[ORM\Column(type'string'length255)]
  26.     private $iso_code2;
  27.     #[ORM\Column(type'string'length255)]
  28.     private $iso_code3;
  29.     #[ORM\Column(type'string'length255)]
  30.     private $iso_number;
  31.     #[ORM\Column(type'string'length255)]
  32.     private $ltd;
  33.     #[ORM\OneToMany(targetEntity\App\Entity\User::class, mappedBy'pays')]
  34.     private $users;
  35.     #[ORM\JoinColumn(nullablefalse)]
  36.     #[ORM\ManyToOne(targetEntity\App\Entity\Zone::class, inversedBy'pays')]
  37.     private $zone;
  38.     #[ORM\OneToMany(targetEntity\App\Entity\Evenement::class, mappedBy'pays'orphanRemovaltrue)]
  39.     private $evenements;
  40.     public function __construct()
  41.     {
  42.         $this->pays_users = new ArrayCollection();
  43.         $this->users = new ArrayCollection();
  44.         $this->evenements = new ArrayCollection();
  45.     }
  46.     public function getId(): ?int
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function getNompays(): ?string
  51.     {
  52.         return $this->nompays;
  53.     }
  54.     public function setNompays(string $nompays): self
  55.     {
  56.         $this->nompays $nompays;
  57.         return $this;
  58.     }
  59.     public function getTva(): ?string
  60.     {
  61.         return $this->tva;
  62.     }
  63.     public function setTva(?string $tva): self
  64.     {
  65.         $this->tva $tva;
  66.         return $this;
  67.     }
  68.     public function getCapital(): ?string
  69.     {
  70.         return $this->capital;
  71.     }
  72.     public function setCapital(string $capital): self
  73.     {
  74.         $this->capital $capital;
  75.         return $this;
  76.     }
  77.     public function getMonnaieCode(): ?string
  78.     {
  79.         return $this->monnaie_code;
  80.     }
  81.     public function setMonnaieCode(string $monnaie_code): self
  82.     {
  83.         $this->monnaie_code $monnaie_code;
  84.         return $this;
  85.     }
  86.     public function getMonnaieNom(): ?string
  87.     {
  88.         return $this->monnaie_nom;
  89.     }
  90.     public function setMonnaieNom(string $monnaie_nom): self
  91.     {
  92.         $this->monnaie_nom $monnaie_nom;
  93.         return $this;
  94.     }
  95.     public function getIndicatif(): ?string
  96.     {
  97.         return $this->indicatif;
  98.     }
  99.     public function setIndicatif(string $indicatif): self
  100.     {
  101.         $this->indicatif $indicatif;
  102.         return $this;
  103.     }
  104.     public function getIsoCode2(): ?string
  105.     {
  106.         return $this->iso_code2;
  107.     }
  108.     public function setIsoCode2(string $iso_code2): self
  109.     {
  110.         $this->iso_code2 $iso_code2;
  111.         return $this;
  112.     }
  113.     public function getIsoCode3(): ?string
  114.     {
  115.         return $this->iso_code3;
  116.     }
  117.     public function setIsoCode3(string $iso_code3): self
  118.     {
  119.         $this->iso_code3 $iso_code3;
  120.         return $this;
  121.     }
  122.     public function getIsoNumber(): ?string
  123.     {
  124.         return $this->iso_number;
  125.     }
  126.     public function setIsoNumber(string $iso_number): self
  127.     {
  128.         $this->iso_number $iso_number;
  129.         return $this;
  130.     }
  131.     public function getLtd(): ?string
  132.     {
  133.         return $this->ltd;
  134.     }
  135.     public function setLtd(string $ltd): self
  136.     {
  137.         $this->ltd $ltd;
  138.         return $this;
  139.     }
  140.     /**
  141.      * @return Collection|User[]
  142.      */
  143.     public function getUsers(): Collection
  144.     {
  145.         return $this->users;
  146.     }
  147.     public function addUser(User $user): self
  148.     {
  149.         if (!$this->users->contains($user)) {
  150.             $this->users[] = $user;
  151.             $user->setPays($this);
  152.         }
  153.         return $this;
  154.     }
  155.     public function removeUser(User $user): self
  156.     {
  157.         if ($this->users->contains($user)) {
  158.             $this->users->removeElement($user);
  159.             // set the owning side to null (unless already changed)
  160.             if ($user->getPays() === $this) {
  161.                 $user->setPays(null);
  162.             }
  163.         }
  164.         return $this;
  165.     }
  166.     public function getZone(): ?zone
  167.     {
  168.         return $this->zone;
  169.     }
  170.     public function setZone(?zone $zone): self
  171.     {
  172.         $this->zone $zone;
  173.         return $this;
  174.     }
  175.     /**
  176.      * @return Collection|Evenement[]
  177.      */
  178.     public function getEvenements(): Collection
  179.     {
  180.         return $this->evenements;
  181.     }
  182.     public function addEvenement(Evenement $evenement): self
  183.     {
  184.         if (!$this->evenements->contains($evenement)) {
  185.             $this->evenements[] = $evenement;
  186.             $evenement->setPays($this);
  187.         }
  188.         return $this;
  189.     }
  190.     public function removeEvenement(Evenement $evenement): self
  191.     {
  192.         if ($this->evenements->contains($evenement)) {
  193.             $this->evenements->removeElement($evenement);
  194.             // set the owning side to null (unless already changed)
  195.             if ($evenement->getPays() === $this) {
  196.                 $evenement->setPays(null);
  197.             }
  198.         }
  199.         return $this;
  200.     }
  201. }