src/Entity/Ville.php line 12

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. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\VilleRepository")
  8.  */
  9. class Ville
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255)
  19.      */
  20.     private $nomville;
  21.     /**
  22.      * @ORM\Column(type="string", length=255)
  23.      */
  24.     private $Adresse1;
  25.     /**
  26.      * @ORM\Column(type="string", length=255, nullable=true)
  27.      */
  28.     private $Adresse2;
  29.     /**
  30.      * @ORM\Column(type="string", length=255)
  31.      */
  32.     private $email;
  33.     /**
  34.      * @ORM\Column(type="string", length=255)
  35.      */
  36.     private $numTel;
  37.     /**
  38.      * @ORM\Column(type="string", length=255, nullable=true)
  39.      */
  40.     private $addresse3;
  41.     /**
  42.      * @ORM\Column(type="string", length=255, nullable=true)
  43.      */
  44.     private $addresse4;
  45.     /**
  46.      * @ORM\Column(type="string", length=255, nullable=true)
  47.      */
  48.     private $addresse5;
  49.     /**
  50.      * @ORM\Column(type="string", length=255, nullable=true)
  51.      */
  52.     private $addresse6;
  53.     /**
  54.      * @ORM\OneToMany(targetEntity=Utilisateur::class, mappedBy="ville")
  55.      */
  56.     private $utilisateurs;
  57.     /**
  58.      * @ORM\OneToMany(targetEntity=Agent::class, mappedBy="ville")
  59.      */
  60.     private $agents;
  61.     /**
  62.      * @ORM\OneToMany(targetEntity=ProgrammeContenaire::class, mappedBy="villeInitiale")
  63.      */
  64.     private $programmeContenaires;
  65.     /**
  66.      * @ORM\Column(type="string", length=2)
  67.      */
  68.     private $flagVille;
  69.     /**
  70.      * @ORM\Column(type="string", length=100)
  71.      */
  72.     private $logo;
  73.     /**
  74.      * @ORM\Column(type="string", length=150, nullable=true)
  75.      */
  76.     private $portBateau;
  77.     /**
  78.      * @ORM\Column(type="integer")
  79.      */
  80.     private $tauxDuJourPays;
  81.     /**
  82.      * @ORM\Column(type="boolean")
  83.      */
  84.     private $isTaux;
  85.     /**
  86.      * @ORM\Column(type="string", length=5)
  87.      */
  88.     private $monnaie;
  89.     /**
  90.      * @ORM\OneToMany(targetEntity=Position::class, mappedBy="ville")
  91.      */
  92.     private $positions;
  93.     /**
  94.      * @ORM\Column(type="string", length=255, nullable=true)
  95.      */
  96.     private $tokenurl;
  97.     /**
  98.      * @ORM\Column(type="string", length=255, nullable=true)
  99.      */
  100.     private $tokenId;
  101.     public function __construct()
  102.     {
  103.         $this->utilisateurs = new ArrayCollection();
  104.         $this->agents = new ArrayCollection();
  105.         $this->programmeContenaires = new ArrayCollection();
  106.         $this->positions = new ArrayCollection();
  107.     }
  108.     public function getId(): ?int
  109.     {
  110.         return $this->id;
  111.     }
  112.     public function getNomville(): ?string
  113.     {
  114.         return $this->nomville;
  115.     }
  116.     public function setNomville(string $nomville): self
  117.     {
  118.         $this->nomville $nomville;
  119.         return $this;
  120.     }
  121.     public function getAdresse1(): ?string
  122.     {
  123.         return $this->Adresse1;
  124.     }
  125.     public function setAdresse1(string $Adresse1): self
  126.     {
  127.         $this->Adresse1 $Adresse1;
  128.         return $this;
  129.     }
  130.     public function getAdresse2(): ?string
  131.     {
  132.         return $this->Adresse2;
  133.     }
  134.     public function setAdresse2(?string $Adresse2): self
  135.     {
  136.         $this->Adresse2 $Adresse2;
  137.         return $this;
  138.     }
  139.     public function getEmail(): ?string
  140.     {
  141.         return $this->email;
  142.     }
  143.     public function setEmail(string $email): self
  144.     {
  145.         $this->email $email;
  146.         return $this;
  147.     }
  148.     public function getNumTel(): ?string
  149.     {
  150.         return $this->numTel;
  151.     }
  152.     public function setNumTel(string $numTel): self
  153.     {
  154.         $this->numTel $numTel;
  155.         return $this;
  156.     }
  157.     public function __toString(){
  158.         // to show the name of the Category in the select
  159.         return $this->nomville;
  160.         // to show the id of the Category in the select
  161.         // return $this->id;
  162.     }
  163.     public function getAddresse3(): ?string
  164.     {
  165.         return $this->addresse3;
  166.     }
  167.     public function setAddresse3(?string $addresse3): self
  168.     {
  169.         $this->addresse3 $addresse3;
  170.         return $this;
  171.     }
  172.     public function getAddresse4(): ?string
  173.     {
  174.         return $this->addresse4;
  175.     }
  176.     public function setAddresse4(?string $addresse4): self
  177.     {
  178.         $this->addresse4 $addresse4;
  179.         return $this;
  180.     }
  181.     public function getAddresse5(): ?string
  182.     {
  183.         return $this->addresse5;
  184.     }
  185.     public function setAddresse5(?string $addresse5): self
  186.     {
  187.         $this->addresse5 $addresse5;
  188.         return $this;
  189.     }
  190.     public function getAddresse6(): ?string
  191.     {
  192.         return $this->addresse6;
  193.     }
  194.     public function setAddresse6(?string $addresse6): self
  195.     {
  196.         $this->addresse6 $addresse6;
  197.         return $this;
  198.     }
  199.     /**
  200.      * @return Collection<int, Utilisateur>
  201.      */
  202.     public function getUtilisateurs(): Collection
  203.     {
  204.         return $this->utilisateurs;
  205.     }
  206.     public function addUtilisateur(Utilisateur $utilisateur): self
  207.     {
  208.         if (!$this->utilisateurs->contains($utilisateur)) {
  209.             $this->utilisateurs[] = $utilisateur;
  210.             $utilisateur->setVille($this);
  211.         }
  212.         return $this;
  213.     }
  214.     public function removeUtilisateur(Utilisateur $utilisateur): self
  215.     {
  216.         if ($this->utilisateurs->removeElement($utilisateur)) {
  217.             // set the owning side to null (unless already changed)
  218.             if ($utilisateur->getVille() === $this) {
  219.                 $utilisateur->setVille(null);
  220.             }
  221.         }
  222.         return $this;
  223.     }
  224.     /**
  225.      * @return Collection<int, Agent>
  226.      */
  227.     public function getAgents(): Collection
  228.     {
  229.         return $this->agents;
  230.     }
  231.     public function addAgent(Agent $agent): self
  232.     {
  233.         if (!$this->agents->contains($agent)) {
  234.             $this->agents[] = $agent;
  235.             $agent->setVille($this);
  236.         }
  237.         return $this;
  238.     }
  239.     public function removeAgent(Agent $agent): self
  240.     {
  241.         if ($this->agents->removeElement($agent)) {
  242.             // set the owning side to null (unless already changed)
  243.             if ($agent->getVille() === $this) {
  244.                 $agent->setVille(null);
  245.             }
  246.         }
  247.         return $this;
  248.     }
  249.     /**
  250.      * @return Collection<int, ProgrammeContenaire>
  251.      */
  252.     public function getProgrammeContenaires(): Collection
  253.     {
  254.         return $this->programmeContenaires;
  255.     }
  256.     public function addProgrammeContenaire(ProgrammeContenaire $programmeContenaire): self
  257.     {
  258.         if (!$this->programmeContenaires->contains($programmeContenaire)) {
  259.             $this->programmeContenaires[] = $programmeContenaire;
  260.             $programmeContenaire->setVilleInitiale($this);
  261.         }
  262.         return $this;
  263.     }
  264.     public function removeProgrammeContenaire(ProgrammeContenaire $programmeContenaire): self
  265.     {
  266.         if ($this->programmeContenaires->removeElement($programmeContenaire)) {
  267.             // set the owning side to null (unless already changed)
  268.             if ($programmeContenaire->getVilleInitiale() === $this) {
  269.                 $programmeContenaire->setVilleInitiale(null);
  270.             }
  271.         }
  272.         return $this;
  273.     }
  274.     public function getFlagVille(): ?string
  275.     {
  276.         return $this->flagVille;
  277.     }
  278.     public function setFlagVille(string $flagVille): self
  279.     {
  280.         $this->flagVille $flagVille;
  281.         return $this;
  282.     }
  283.     public function getLogo(): ?string
  284.     {
  285.         return $this->logo;
  286.     }
  287.     public function setLogo(string $logo): self
  288.     {
  289.         $this->logo $logo;
  290.         return $this;
  291.     }
  292.     public function getPortBateau(): ?string
  293.     {
  294.         return $this->portBateau;
  295.     }
  296.     public function setPortBateau(?string $portBateau): self
  297.     {
  298.         $this->portBateau $portBateau;
  299.         return $this;
  300.     }
  301.     public function getTauxDuJourPays(): ?int
  302.     {
  303.         return $this->tauxDuJourPays;
  304.     }
  305.     public function setTauxDuJourPays(int $tauxDuJourPays): self
  306.     {
  307.         $this->tauxDuJourPays $tauxDuJourPays;
  308.         return $this;
  309.     }
  310.     public function isIsTaux(): ?bool
  311.     {
  312.         return $this->isTaux;
  313.     }
  314.     public function setIsTaux(bool $isTaux): self
  315.     {
  316.         $this->isTaux $isTaux;
  317.         return $this;
  318.     }
  319.     public function getMonnaie(): ?string
  320.     {
  321.         return $this->monnaie;
  322.     }
  323.     public function setMonnaie(string $monnaie): self
  324.     {
  325.         $this->monnaie $monnaie;
  326.         return $this;
  327.     }
  328.     /**
  329.      * @return Collection<int, Position>
  330.      */
  331.     public function getPositions(): Collection
  332.     {
  333.         return $this->positions;
  334.     }
  335.     public function addPosition(Position $position): self
  336.     {
  337.         if (!$this->positions->contains($position)) {
  338.             $this->positions[] = $position;
  339.             $position->setVille($this);
  340.         }
  341.         return $this;
  342.     }
  343.     public function removePosition(Position $position): self
  344.     {
  345.         if ($this->positions->removeElement($position)) {
  346.             // set the owning side to null (unless already changed)
  347.             if ($position->getVille() === $this) {
  348.                 $position->setVille(null);
  349.             }
  350.         }
  351.         return $this;
  352.     }
  353.     public function getTokenUrl(): ?string
  354.     {
  355.         return $this->tokenurl;
  356.     }
  357.     public function setTokenUrl(?string $tokenurl): self
  358.     {
  359.         $this->tokenurl $tokenurl;
  360.         return $this;
  361.     }
  362.     public function getTokenId(): ?string
  363.     {
  364.         return $this->tokenId;
  365.     }
  366.     public function setTokenId(?string $tokenId): self
  367.     {
  368.         $this->tokenId $tokenId;
  369.         return $this;
  370.     }
  371. }