src/Entity/SocieteLivraison.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SocieteLivraisonRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=SocieteLivraisonRepository::class)
  9.  */
  10. class SocieteLivraison
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $designation;
  22.     /**
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private $description;
  26.     /**
  27.      * @ORM\Column(type="float")
  28.      */
  29.     private $telephone;
  30.     /**
  31.      * @ORM\Column(type="string", length=255)
  32.      */
  33.     private $mail;
  34.     /**
  35.      * @ORM\Column(type="boolean")
  36.      */
  37.     private $choixTarif;
  38.     /**
  39.      * @ORM\Column(type="float")
  40.      */
  41.     private $smsRestant;
  42.     /**
  43.      * @ORM\Column(type="boolean")
  44.      */
  45.     private $isAutomatique;
  46.     /**
  47.      * @ORM\Column(type="boolean")
  48.      */
  49.     private $isValide;
  50.     /**
  51.      * @ORM\OneToMany(targetEntity=TarifKilometrique::class, mappedBy="societeLivraison")
  52.      */
  53.     private $tarifKilometriques;
  54.     /**
  55.      * @ORM\OneToMany(targetEntity=Zone::class, mappedBy="societeLivraison")
  56.      */
  57.     private $zones;
  58.     /**
  59.      * @ORM\OneToMany(targetEntity=TarifZone::class, mappedBy="societeLivraison")
  60.      */
  61.     private $tarifZones;
  62.     /**
  63.      * @ORM\OneToMany(targetEntity=User::class, mappedBy="societeLivraison")
  64.      */
  65.     private $users;
  66.     /**
  67.      * @ORM\OneToMany(targetEntity=IctoMouvement::class, mappedBy="societeLivraison")
  68.      */
  69.     private $ictoMouvements;
  70.     /**
  71.      * @ORM\OneToMany(targetEntity=IctoRemboursement::class, mappedBy="societeLivraison")
  72.      */
  73.     private $ictoRemboursements;
  74.     /**
  75.      * @ORM\OneToMany(targetEntity=HoraireLivraison::class, mappedBy="societeLivraison")
  76.      */
  77.     private $horaireLivraisons;
  78.     /**
  79.      * @ORM\OneToMany(targetEntity=IctusCommande::class, mappedBy="societeLivraison")
  80.      */
  81.     private $ictusCommandes;
  82.     /**
  83.      * @ORM\OneToMany(targetEntity=Livraison::class, mappedBy="societeLivraison")
  84.      */
  85.     private $livraisons;
  86.     /**
  87.      * @ORM\OneToMany(targetEntity=LivraisonVille::class, mappedBy="societeLivraison")
  88.      */
  89.     private $livraisonVilles;
  90.  
  91.     public function __construct()
  92.     {
  93.         $this->tarifKilometriques = new ArrayCollection();
  94.         $this->zones = new ArrayCollection();
  95.         $this->tarifZones = new ArrayCollection();
  96.         $this->users = new ArrayCollection();
  97.         $this->ictoMouvements = new ArrayCollection();
  98.         $this->ictoRemboursements = new ArrayCollection();
  99.         $this->horaireLivraisons = new ArrayCollection();
  100.         $this->ictusCommandes = new ArrayCollection();
  101.         $this->livraisons = new ArrayCollection();
  102.         $this->livraisonVilles = new ArrayCollection();
  103.     }
  104.     public function getId(): ?int
  105.     {
  106.         return $this->id;
  107.     }
  108.     public function getDesignation(): ?string
  109.     {
  110.         return $this->designation;
  111.     }
  112.     public function setDesignation(string $designation): self
  113.     {
  114.         $this->designation $designation;
  115.         return $this;
  116.     }
  117.     public function getDescription(): ?string
  118.     {
  119.         return $this->description;
  120.     }
  121.     public function setDescription(string $description): self
  122.     {
  123.         $this->description $description;
  124.         return $this;
  125.     }
  126.     public function getTelephone(): ?float
  127.     {
  128.         return $this->telephone;
  129.     }
  130.     public function setTelephone(float $telephone): self
  131.     {
  132.         $this->telephone $telephone;
  133.         return $this;
  134.     }
  135.     public function getMail(): ?string
  136.     {
  137.         return $this->mail;
  138.     }
  139.     public function setMail(string $mail): self
  140.     {
  141.         $this->mail $mail;
  142.         return $this;
  143.     }
  144.     public function isChoixTarif(): ?bool
  145.     {
  146.         return $this->choixTarif;
  147.     }
  148.     public function setChoixTarif(bool $choixTarif): self
  149.     {
  150.         $this->choixTarif $choixTarif;
  151.         return $this;
  152.     }
  153.     public function getSmsRestant(): ?float
  154.     {
  155.         return $this->smsRestant;
  156.     }
  157.     public function setSmsRestant(float $smsRestant): self
  158.     {
  159.         $this->smsRestant $smsRestant;
  160.         return $this;
  161.     }
  162.     public function isIsAutomatique(): ?bool
  163.     {
  164.         return $this->isAutomatique;
  165.     }
  166.     public function setIsAutomatique(bool $isAutomatique): self
  167.     {
  168.         $this->isAutomatique $isAutomatique;
  169.         return $this;
  170.     }
  171.     public function isIsValide(): ?bool
  172.     {
  173.         return $this->isValide;
  174.     }
  175.     public function setIsValide(bool $isValide): self
  176.     {
  177.         $this->isValide $isValide;
  178.         return $this;
  179.     }
  180.     /**
  181.      * @return Collection<int, TarifKilometrique>
  182.      */
  183.     public function getTarifKilometriques(): Collection
  184.     {
  185.         return $this->tarifKilometriques;
  186.     }
  187.     public function addTarifKilometrique(TarifKilometrique $tarifKilometrique): self
  188.     {
  189.         if (!$this->tarifKilometriques->contains($tarifKilometrique)) {
  190.             $this->tarifKilometriques[] = $tarifKilometrique;
  191.             $tarifKilometrique->setSocieteLivraison($this);
  192.         }
  193.         return $this;
  194.     }
  195.     public function removeTarifKilometrique(TarifKilometrique $tarifKilometrique): self
  196.     {
  197.         if ($this->tarifKilometriques->removeElement($tarifKilometrique)) {
  198.             // set the owning side to null (unless already changed)
  199.             if ($tarifKilometrique->getSocieteLivraison() === $this) {
  200.                 $tarifKilometrique->setSocieteLivraison(null);
  201.             }
  202.         }
  203.         return $this;
  204.     }
  205.     /**
  206.      * @return Collection<int, Zone>
  207.      */
  208.     public function getZones(): Collection
  209.     {
  210.         return $this->zones;
  211.     }
  212.     public function addZone(Zone $zone): self
  213.     {
  214.         if (!$this->zones->contains($zone)) {
  215.             $this->zones[] = $zone;
  216.             $zone->setSocieteLivraison($this);
  217.         }
  218.         return $this;
  219.     }
  220.     public function removeZone(Zone $zone): self
  221.     {
  222.         if ($this->zones->removeElement($zone)) {
  223.             // set the owning side to null (unless already changed)
  224.             if ($zone->getSocieteLivraison() === $this) {
  225.                 $zone->setSocieteLivraison(null);
  226.             }
  227.         }
  228.         return $this;
  229.     }
  230.     /**
  231.      * @return Collection<int, TarifZone>
  232.      */
  233.     public function getTarifZones(): Collection
  234.     {
  235.         return $this->tarifZones;
  236.     }
  237.     public function addTarifZone(TarifZone $tarifZone): self
  238.     {
  239.         if (!$this->tarifZones->contains($tarifZone)) {
  240.             $this->tarifZones[] = $tarifZone;
  241.             $tarifZone->setSocieteLivraison($this);
  242.         }
  243.         return $this;
  244.     }
  245.     public function removeTarifZone(TarifZone $tarifZone): self
  246.     {
  247.         if ($this->tarifZones->removeElement($tarifZone)) {
  248.             // set the owning side to null (unless already changed)
  249.             if ($tarifZone->getSocieteLivraison() === $this) {
  250.                 $tarifZone->setSocieteLivraison(null);
  251.             }
  252.         }
  253.         return $this;
  254.     }
  255.     /**
  256.      * @return Collection<int, User>
  257.      */
  258.     public function getUsers(): Collection
  259.     {
  260.         return $this->users;
  261.     }
  262.     public function addUser(User $user): self
  263.     {
  264.         if (!$this->users->contains($user)) {
  265.             $this->users[] = $user;
  266.             $user->setSocieteLivraison($this);
  267.         }
  268.         return $this;
  269.     }
  270.     public function removeUser(User $user): self
  271.     {
  272.         if ($this->users->removeElement($user)) {
  273.             // set the owning side to null (unless already changed)
  274.             if ($user->getSocieteLivraison() === $this) {
  275.                 $user->setSocieteLivraison(null);
  276.             }
  277.         }
  278.         return $this;
  279.     }
  280.     /**
  281.      * @return Collection<int, IctoMouvement>
  282.      */
  283.     public function getIctoMouvements(): Collection
  284.     {
  285.         return $this->ictoMouvements;
  286.     }
  287.     public function addIctoMouvement(IctoMouvement $ictoMouvement): self
  288.     {
  289.         if (!$this->ictoMouvements->contains($ictoMouvement)) {
  290.             $this->ictoMouvements[] = $ictoMouvement;
  291.             $ictoMouvement->setSocieteLivraison($this);
  292.         }
  293.         return $this;
  294.     }
  295.     public function removeIctoMouvement(IctoMouvement $ictoMouvement): self
  296.     {
  297.         if ($this->ictoMouvements->removeElement($ictoMouvement)) {
  298.             // set the owning side to null (unless already changed)
  299.             if ($ictoMouvement->getSocieteLivraison() === $this) {
  300.                 $ictoMouvement->setSocieteLivraison(null);
  301.             }
  302.         }
  303.         return $this;
  304.     }
  305.     /**
  306.      * @return Collection<int, IctoRemboursement>
  307.      */
  308.     public function getIctoRemboursements(): Collection
  309.     {
  310.         return $this->ictoRemboursements;
  311.     }
  312.     public function addIctoRemboursement(IctoRemboursement $ictoRemboursement): self
  313.     {
  314.         if (!$this->ictoRemboursements->contains($ictoRemboursement)) {
  315.             $this->ictoRemboursements[] = $ictoRemboursement;
  316.             $ictoRemboursement->setSocieteLivraison($this);
  317.         }
  318.         return $this;
  319.     }
  320.     public function removeIctoRemboursement(IctoRemboursement $ictoRemboursement): self
  321.     {
  322.         if ($this->ictoRemboursements->removeElement($ictoRemboursement)) {
  323.             // set the owning side to null (unless already changed)
  324.             if ($ictoRemboursement->getSocieteLivraison() === $this) {
  325.                 $ictoRemboursement->setSocieteLivraison(null);
  326.             }
  327.         }
  328.         return $this;
  329.     }
  330.     /**
  331.      * @return Collection<int, HoraireLivraison>
  332.      */
  333.     public function getHoraireLivraisons(): Collection
  334.     {
  335.         return $this->horaireLivraisons;
  336.     }
  337.     public function addHoraireLivraison(HoraireLivraison $horaireLivraison): self
  338.     {
  339.         if (!$this->horaireLivraisons->contains($horaireLivraison)) {
  340.             $this->horaireLivraisons[] = $horaireLivraison;
  341.             $horaireLivraison->setSocieteLivraison($this);
  342.         }
  343.         return $this;
  344.     }
  345.     public function removeHoraireLivraison(HoraireLivraison $horaireLivraison): self
  346.     {
  347.         if ($this->horaireLivraisons->removeElement($horaireLivraison)) {
  348.             // set the owning side to null (unless already changed)
  349.             if ($horaireLivraison->getSocieteLivraison() === $this) {
  350.                 $horaireLivraison->setSocieteLivraison(null);
  351.             }
  352.         }
  353.         return $this;
  354.     }
  355.     /**
  356.      * @return Collection<int, IctusCommande>
  357.      */
  358.     public function getIctusCommandes(): Collection
  359.     {
  360.         return $this->ictusCommandes;
  361.     }
  362.     public function addIctusCommande(IctusCommande $ictusCommande): self
  363.     {
  364.         if (!$this->ictusCommandes->contains($ictusCommande)) {
  365.             $this->ictusCommandes[] = $ictusCommande;
  366.             $ictusCommande->setSocieteLivraison($this);
  367.         }
  368.         return $this;
  369.     }
  370.     public function removeIctusCommande(IctusCommande $ictusCommande): self
  371.     {
  372.         if ($this->ictusCommandes->removeElement($ictusCommande)) {
  373.             // set the owning side to null (unless already changed)
  374.             if ($ictusCommande->getSocieteLivraison() === $this) {
  375.                 $ictusCommande->setSocieteLivraison(null);
  376.             }
  377.         }
  378.         return $this;
  379.     }
  380.     /**
  381.      * @return Collection<int, Livraison>
  382.      */
  383.     public function getLivraisons(): Collection
  384.     {
  385.         return $this->livraisons;
  386.     }
  387.     public function addLivraison(Livraison $livraison): self
  388.     {
  389.         if (!$this->livraisons->contains($livraison)) {
  390.             $this->livraisons[] = $livraison;
  391.             $livraison->setSocieteLivraison($this);
  392.         }
  393.         return $this;
  394.     }
  395.     public function removeLivraison(Livraison $livraison): self
  396.     {
  397.         if ($this->livraisons->removeElement($livraison)) {
  398.             // set the owning side to null (unless already changed)
  399.             if ($livraison->getSocieteLivraison() === $this) {
  400.                 $livraison->setSocieteLivraison(null);
  401.             }
  402.         }
  403.         return $this;
  404.     }
  405.     /**
  406.      * @return Collection<int, LivraisonVille>
  407.      */
  408.     public function getLivraisonVilles(): Collection
  409.     {
  410.         return $this->livraisonVilles;
  411.     }
  412.     public function addLivraisonVille(LivraisonVille $livraisonVille): self
  413.     {
  414.         if (!$this->livraisonVilles->contains($livraisonVille)) {
  415.             $this->livraisonVilles[] = $livraisonVille;
  416.             $livraisonVille->setSocieteLivraison($this);
  417.         }
  418.         return $this;
  419.     }
  420.     public function removeLivraisonVille(LivraisonVille $livraisonVille): self
  421.     {
  422.         if ($this->livraisonVilles->removeElement($livraisonVille)) {
  423.             // set the owning side to null (unless already changed)
  424.             if ($livraisonVille->getSocieteLivraison() === $this) {
  425.                 $livraisonVille->setSocieteLivraison(null);
  426.             }
  427.         }
  428.         return $this;
  429.     }
  430.    
  431. }