<?php
namespace App\Entity;
use App\Repository\SocieteLivraisonRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=SocieteLivraisonRepository::class)
*/
class SocieteLivraison
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $designation;
/**
* @ORM\Column(type="string", length=255)
*/
private $description;
/**
* @ORM\Column(type="float")
*/
private $telephone;
/**
* @ORM\Column(type="string", length=255)
*/
private $mail;
/**
* @ORM\Column(type="boolean")
*/
private $choixTarif;
/**
* @ORM\Column(type="float")
*/
private $smsRestant;
/**
* @ORM\Column(type="boolean")
*/
private $isAutomatique;
/**
* @ORM\Column(type="boolean")
*/
private $isValide;
/**
* @ORM\OneToMany(targetEntity=TarifKilometrique::class, mappedBy="societeLivraison")
*/
private $tarifKilometriques;
/**
* @ORM\OneToMany(targetEntity=Zone::class, mappedBy="societeLivraison")
*/
private $zones;
/**
* @ORM\OneToMany(targetEntity=TarifZone::class, mappedBy="societeLivraison")
*/
private $tarifZones;
/**
* @ORM\OneToMany(targetEntity=User::class, mappedBy="societeLivraison")
*/
private $users;
/**
* @ORM\OneToMany(targetEntity=IctoMouvement::class, mappedBy="societeLivraison")
*/
private $ictoMouvements;
/**
* @ORM\OneToMany(targetEntity=IctoRemboursement::class, mappedBy="societeLivraison")
*/
private $ictoRemboursements;
/**
* @ORM\OneToMany(targetEntity=HoraireLivraison::class, mappedBy="societeLivraison")
*/
private $horaireLivraisons;
/**
* @ORM\OneToMany(targetEntity=IctusCommande::class, mappedBy="societeLivraison")
*/
private $ictusCommandes;
/**
* @ORM\OneToMany(targetEntity=Livraison::class, mappedBy="societeLivraison")
*/
private $livraisons;
/**
* @ORM\OneToMany(targetEntity=LivraisonVille::class, mappedBy="societeLivraison")
*/
private $livraisonVilles;
public function __construct()
{
$this->tarifKilometriques = new ArrayCollection();
$this->zones = new ArrayCollection();
$this->tarifZones = new ArrayCollection();
$this->users = new ArrayCollection();
$this->ictoMouvements = new ArrayCollection();
$this->ictoRemboursements = new ArrayCollection();
$this->horaireLivraisons = new ArrayCollection();
$this->ictusCommandes = new ArrayCollection();
$this->livraisons = new ArrayCollection();
$this->livraisonVilles = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getDesignation(): ?string
{
return $this->designation;
}
public function setDesignation(string $designation): self
{
$this->designation = $designation;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): self
{
$this->description = $description;
return $this;
}
public function getTelephone(): ?float
{
return $this->telephone;
}
public function setTelephone(float $telephone): self
{
$this->telephone = $telephone;
return $this;
}
public function getMail(): ?string
{
return $this->mail;
}
public function setMail(string $mail): self
{
$this->mail = $mail;
return $this;
}
public function isChoixTarif(): ?bool
{
return $this->choixTarif;
}
public function setChoixTarif(bool $choixTarif): self
{
$this->choixTarif = $choixTarif;
return $this;
}
public function getSmsRestant(): ?float
{
return $this->smsRestant;
}
public function setSmsRestant(float $smsRestant): self
{
$this->smsRestant = $smsRestant;
return $this;
}
public function isIsAutomatique(): ?bool
{
return $this->isAutomatique;
}
public function setIsAutomatique(bool $isAutomatique): self
{
$this->isAutomatique = $isAutomatique;
return $this;
}
public function isIsValide(): ?bool
{
return $this->isValide;
}
public function setIsValide(bool $isValide): self
{
$this->isValide = $isValide;
return $this;
}
/**
* @return Collection<int, TarifKilometrique>
*/
public function getTarifKilometriques(): Collection
{
return $this->tarifKilometriques;
}
public function addTarifKilometrique(TarifKilometrique $tarifKilometrique): self
{
if (!$this->tarifKilometriques->contains($tarifKilometrique)) {
$this->tarifKilometriques[] = $tarifKilometrique;
$tarifKilometrique->setSocieteLivraison($this);
}
return $this;
}
public function removeTarifKilometrique(TarifKilometrique $tarifKilometrique): self
{
if ($this->tarifKilometriques->removeElement($tarifKilometrique)) {
// set the owning side to null (unless already changed)
if ($tarifKilometrique->getSocieteLivraison() === $this) {
$tarifKilometrique->setSocieteLivraison(null);
}
}
return $this;
}
/**
* @return Collection<int, Zone>
*/
public function getZones(): Collection
{
return $this->zones;
}
public function addZone(Zone $zone): self
{
if (!$this->zones->contains($zone)) {
$this->zones[] = $zone;
$zone->setSocieteLivraison($this);
}
return $this;
}
public function removeZone(Zone $zone): self
{
if ($this->zones->removeElement($zone)) {
// set the owning side to null (unless already changed)
if ($zone->getSocieteLivraison() === $this) {
$zone->setSocieteLivraison(null);
}
}
return $this;
}
/**
* @return Collection<int, TarifZone>
*/
public function getTarifZones(): Collection
{
return $this->tarifZones;
}
public function addTarifZone(TarifZone $tarifZone): self
{
if (!$this->tarifZones->contains($tarifZone)) {
$this->tarifZones[] = $tarifZone;
$tarifZone->setSocieteLivraison($this);
}
return $this;
}
public function removeTarifZone(TarifZone $tarifZone): self
{
if ($this->tarifZones->removeElement($tarifZone)) {
// set the owning side to null (unless already changed)
if ($tarifZone->getSocieteLivraison() === $this) {
$tarifZone->setSocieteLivraison(null);
}
}
return $this;
}
/**
* @return Collection<int, User>
*/
public function getUsers(): Collection
{
return $this->users;
}
public function addUser(User $user): self
{
if (!$this->users->contains($user)) {
$this->users[] = $user;
$user->setSocieteLivraison($this);
}
return $this;
}
public function removeUser(User $user): self
{
if ($this->users->removeElement($user)) {
// set the owning side to null (unless already changed)
if ($user->getSocieteLivraison() === $this) {
$user->setSocieteLivraison(null);
}
}
return $this;
}
/**
* @return Collection<int, IctoMouvement>
*/
public function getIctoMouvements(): Collection
{
return $this->ictoMouvements;
}
public function addIctoMouvement(IctoMouvement $ictoMouvement): self
{
if (!$this->ictoMouvements->contains($ictoMouvement)) {
$this->ictoMouvements[] = $ictoMouvement;
$ictoMouvement->setSocieteLivraison($this);
}
return $this;
}
public function removeIctoMouvement(IctoMouvement $ictoMouvement): self
{
if ($this->ictoMouvements->removeElement($ictoMouvement)) {
// set the owning side to null (unless already changed)
if ($ictoMouvement->getSocieteLivraison() === $this) {
$ictoMouvement->setSocieteLivraison(null);
}
}
return $this;
}
/**
* @return Collection<int, IctoRemboursement>
*/
public function getIctoRemboursements(): Collection
{
return $this->ictoRemboursements;
}
public function addIctoRemboursement(IctoRemboursement $ictoRemboursement): self
{
if (!$this->ictoRemboursements->contains($ictoRemboursement)) {
$this->ictoRemboursements[] = $ictoRemboursement;
$ictoRemboursement->setSocieteLivraison($this);
}
return $this;
}
public function removeIctoRemboursement(IctoRemboursement $ictoRemboursement): self
{
if ($this->ictoRemboursements->removeElement($ictoRemboursement)) {
// set the owning side to null (unless already changed)
if ($ictoRemboursement->getSocieteLivraison() === $this) {
$ictoRemboursement->setSocieteLivraison(null);
}
}
return $this;
}
/**
* @return Collection<int, HoraireLivraison>
*/
public function getHoraireLivraisons(): Collection
{
return $this->horaireLivraisons;
}
public function addHoraireLivraison(HoraireLivraison $horaireLivraison): self
{
if (!$this->horaireLivraisons->contains($horaireLivraison)) {
$this->horaireLivraisons[] = $horaireLivraison;
$horaireLivraison->setSocieteLivraison($this);
}
return $this;
}
public function removeHoraireLivraison(HoraireLivraison $horaireLivraison): self
{
if ($this->horaireLivraisons->removeElement($horaireLivraison)) {
// set the owning side to null (unless already changed)
if ($horaireLivraison->getSocieteLivraison() === $this) {
$horaireLivraison->setSocieteLivraison(null);
}
}
return $this;
}
/**
* @return Collection<int, IctusCommande>
*/
public function getIctusCommandes(): Collection
{
return $this->ictusCommandes;
}
public function addIctusCommande(IctusCommande $ictusCommande): self
{
if (!$this->ictusCommandes->contains($ictusCommande)) {
$this->ictusCommandes[] = $ictusCommande;
$ictusCommande->setSocieteLivraison($this);
}
return $this;
}
public function removeIctusCommande(IctusCommande $ictusCommande): self
{
if ($this->ictusCommandes->removeElement($ictusCommande)) {
// set the owning side to null (unless already changed)
if ($ictusCommande->getSocieteLivraison() === $this) {
$ictusCommande->setSocieteLivraison(null);
}
}
return $this;
}
/**
* @return Collection<int, Livraison>
*/
public function getLivraisons(): Collection
{
return $this->livraisons;
}
public function addLivraison(Livraison $livraison): self
{
if (!$this->livraisons->contains($livraison)) {
$this->livraisons[] = $livraison;
$livraison->setSocieteLivraison($this);
}
return $this;
}
public function removeLivraison(Livraison $livraison): self
{
if ($this->livraisons->removeElement($livraison)) {
// set the owning side to null (unless already changed)
if ($livraison->getSocieteLivraison() === $this) {
$livraison->setSocieteLivraison(null);
}
}
return $this;
}
/**
* @return Collection<int, LivraisonVille>
*/
public function getLivraisonVilles(): Collection
{
return $this->livraisonVilles;
}
public function addLivraisonVille(LivraisonVille $livraisonVille): self
{
if (!$this->livraisonVilles->contains($livraisonVille)) {
$this->livraisonVilles[] = $livraisonVille;
$livraisonVille->setSocieteLivraison($this);
}
return $this;
}
public function removeLivraisonVille(LivraisonVille $livraisonVille): self
{
if ($this->livraisonVilles->removeElement($livraisonVille)) {
// set the owning side to null (unless already changed)
if ($livraisonVille->getSocieteLivraison() === $this) {
$livraisonVille->setSocieteLivraison(null);
}
}
return $this;
}
}