src/Entity/Commande.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use App\Repository\CommandeRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=CommandeRepository::class)
  9.  */
  10. class Commande
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="integer")
  20.      */
  21.     private $nombreColisTotal;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $numeroDae;
  26.     /**
  27.      * @ORM\Column(type="boolean")
  28.      */
  29.     private $assuranceLivraison;
  30.     /**
  31.      * @ORM\Column(type="boolean")
  32.      */
  33.     private $emballageLivraison;
  34.     /**
  35.      * @ORM\Column(type="string", length=255, nullable=true) 
  36.      */
  37.     private $fichierFacture;
  38.     /**
  39.      * @ORM\Column(type="string", length=255)
  40.      */
  41.     private $numeroFacture
  42.     /**
  43.      * @ORM\Column(type="float")
  44.      */
  45.     private $montantTotalFacture;
  46.     /**
  47.      * @ORM\Column(type="date", nullable=true)
  48.      */
  49.     private $dateDebutFenetre;
  50.     /**
  51.      * @ORM\Column(type="date", nullable=true)
  52.      */
  53.     private $dateFinFenetre;
  54.     /**
  55.      * @ORM\Column(type="date")
  56.      */
  57.     private $dateCommandeSoumission;
  58.     /**
  59.      * @ORM\Column(type="string", length=255)
  60.      */
  61.     private $codePostalLivraison;
  62.     /**
  63.      * @ORM\Column(type="string", length=255)
  64.      */
  65.     private $villeLivraison;
  66.     /**
  67.      * @ORM\Column(type="string", length=255)
  68.      */
  69.     private $adresseLivraison;
  70.     /**
  71.      * @ORM\Column(type="string", length=255, nullable=true)
  72.      */
  73.     private $complementAdresseLivraison;
  74.     /**
  75.      * @ORM\Column(type="string", length=255)
  76.      */
  77.     private $etatUs;
  78.     /**
  79.      * @ORM\Column(type="string", length=255)
  80.      */
  81.     private $state;
  82.     /**
  83.      * @ORM\Column(type="text", nullable=true)
  84.      */
  85.     private $observation;
  86.     /**
  87.      * @ORM\Column(type="string", length=255, nullable=true)
  88.      */
  89.     private $province;
  90.     /**
  91.      * @ORM\Column(type="integer", nullable=true)
  92.      */
  93.     private $nombreBouteilleRouge;
  94.     /**
  95.      * @ORM\Column(type="integer", nullable=true)
  96.      */
  97.     private $nombreBouteilleBlanc;
  98.     /**
  99.      * @ORM\Column(type="integer", nullable=true)
  100.      */
  101.     private $nombreBouteillePetillant;
  102.     /**
  103.      * @ORM\Column(type="string", length=255, nullable=true)
  104.      */
  105.     private $token;
  106.     /**
  107.      * @ORM\ManyToOne(targetEntity=Client::class, inversedBy="commandes")
  108.      * @ORM\JoinColumn(nullable=false)
  109.      */
  110.     private $client;
  111.     /**
  112.      * @ORM\OneToOne(targetEntity=ClientFinal::class, inversedBy="commande", cascade={"persist", "remove"})
  113.      * @ORM\JoinColumn(nullable=false)
  114.      */
  115.     private $clientFinal;
  116.     /**
  117.      * @ORM\OneToMany(targetEntity=Colis::class, mappedBy="commande", orphanRemoval=true)
  118.      */
  119.     private $colis;
  120.     /**
  121.      * @ORM\Column(type="boolean")
  122.      */
  123.     private $fedexPdfGenerated;
  124.     /**
  125.      * @ORM\Column(type="boolean")
  126.      */
  127.     private $isTemporaire;
  128.     /**
  129.      * @ORM\Column(type="boolean")
  130.      */
  131.     private $isValideeParClient;
  132.     /**
  133.      * @ORM\Column(type="boolean")
  134.      */
  135.     private $commandeMassive;
  136.     /**
  137.      * @ORM\Column(type="date")
  138.      */
  139.     private $dateCollecte;
  140.     private $previDebut;
  141.     private $previFin;
  142.     private $crenoUpdatable;
  143.     /**
  144.      * @ORM\Column(type="integer", nullable=true)
  145.      */
  146.     private $nombreMagnumRouge;
  147.     /**
  148.      * @ORM\Column(type="integer", nullable=true)
  149.      */
  150.     private $nombreMagnumBlanc;
  151.     /**
  152.      * @ORM\Column(type="integer", nullable=true)
  153.      */
  154.     private $nombreMagnumPetillant;
  155.     
  156.     /** 
  157.      * @ORM\Column(type="string", length=255, nullable=true)
  158.      */
  159.     private $trackingNumber;
  160.     /**
  161.      * @ORM\Column(type="boolean", nullable=true)
  162.      */
  163.     private $fedexPdfAvailable;
  164.     /**
  165.      * @ORM\Column(type="date", nullable=true)
  166.      */
  167.     private $shipDate;
  168.     /**
  169.      * @ORM\Column(type="string", length=255, nullable=true)
  170.      */
  171.     private $priorUrl;
  172.     /**
  173.      * @ORM\Column(type="string", length=255, nullable=true)
  174.      */
  175.     private $typeEmballage;
  176.     /**
  177.      * @ORM\Column(type="string", length=255, nullable=true)
  178.      */
  179.     private $individualTrackingNumbers;
  180.     /**
  181.      * @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
  182.      */
  183.     private $fastPickup;
  184.     /**
  185.      * @ORM\Column(type="string", length=255, nullable=true)
  186.      */
  187.     private $fichierFactureProForma;
  188.     /**
  189.      * @ORM\Column(type="string", length=255, nullable=true)
  190.      */
  191.     private $proForma
  192.     /**
  193.      * @ORM\Column(type="boolean", nullable=true)
  194.      */
  195.     private $dap;
  196.     
  197.     /**
  198.      * @ORM\Column(type="boolean", nullable=true)
  199.      */
  200.     private $servicePriority;    
  201.      /**
  202.      * @ORM\Column(type="integer", nullable=true)
  203.      */
  204.     private $commandeIdPresta;
  205.     public function __construct()
  206.     {
  207.         $this->colis = new ArrayCollection();
  208.     }
  209.     public function getId(): ?int
  210.     {
  211.         return $this->id;
  212.     }
  213.     public function getNombreColisTotal(): ?int
  214.     {
  215.         return $this->nombreColisTotal;
  216.     }
  217.     public function setNombreColisTotal(int $nombreColisTotal): self
  218.     {
  219.         $this->nombreColisTotal $nombreColisTotal;
  220.         return $this;
  221.     }
  222.     public function getNumeroDae(): ?string
  223.     {
  224.         return $this->numeroDae;
  225.     }
  226.     public function setNumeroDae(?string $numeroDae): self
  227.     {
  228.         $this->numeroDae $numeroDae;
  229.         return $this;
  230.     }
  231.     public function isAssuranceLivraison(): ?bool
  232.     {
  233.         return $this->assuranceLivraison;
  234.     }
  235.     public function setAssuranceLivraison(bool $assuranceLivraison): self
  236.     {
  237.         $this->assuranceLivraison $assuranceLivraison;
  238.         return $this;
  239.     }
  240.     public function isEmballageLivraison(): ?bool
  241.     {
  242.         return $this->emballageLivraison;
  243.     }
  244.     public function setEmballageLivraison(bool $emballageLivraison): self
  245.     {
  246.         $this->emballageLivraison $emballageLivraison;
  247.         return $this;
  248.     }
  249.     public function getFichierFacture(): ?string
  250.     {
  251.         return $this->fichierFacture;
  252.     }
  253.     public function setFichierFacture(?string $fichierFacture): self
  254.     {
  255.         $this->fichierFacture $fichierFacture;
  256.         return $this;
  257.     }
  258.     public function getNumeroFacture(): ?string
  259.     {
  260.         return $this->numeroFacture;
  261.     }
  262.     public function setNumeroFacture(string $numeroFacture): self
  263.     {
  264.         $this->numeroFacture $numeroFacture;
  265.         return $this;
  266.     }
  267.     public function getMontantTotalFacture(): ?float
  268.     {
  269.         return $this->montantTotalFacture;
  270.     }
  271.     public function setMontantTotalFacture(float $montantTotalFacture): self
  272.     {
  273.         $this->montantTotalFacture $montantTotalFacture;
  274.         return $this;
  275.     }
  276.     public function getDateDebutFenetre(): ?\DateTimeInterface
  277.     {
  278.         return $this->dateDebutFenetre;
  279.     }
  280.     public function setDateDebutFenetre(?\DateTimeInterface $dateDebutFenetre): self
  281.     {
  282.         $this->dateDebutFenetre $dateDebutFenetre;
  283.         return $this;
  284.     }
  285.     public function getDateFinFenetre(): ?\DateTimeInterface
  286.     {
  287.         return $this->dateFinFenetre;
  288.     }
  289.     public function setDateFinFenetre(?\DateTimeInterface $dateFinFenetre): self
  290.     {
  291.         $this->dateFinFenetre $dateFinFenetre;
  292.         return $this;
  293.     }
  294.     public function getDateCommandeSoumission(): ?\DateTimeInterface
  295.     {
  296.         return $this->dateCommandeSoumission;
  297.     }
  298.     public function setDateCommandeSoumission(\DateTimeInterface $dateCommandeSoumission): self
  299.     {
  300.         $this->dateCommandeSoumission $dateCommandeSoumission;
  301.         return $this;
  302.     }
  303.     public function getCodePostalLivraison(): ?string
  304.     {
  305.         return $this->codePostalLivraison;
  306.     }
  307.     public function setCodePostalLivraison(string $codePostalLivraison): self
  308.     {
  309.         $this->codePostalLivraison $codePostalLivraison;
  310.         return $this;
  311.     }
  312.     public function getVilleLivraison(): ?string
  313.     {
  314.         return $this->villeLivraison;
  315.     }
  316.     public function setVilleLivraison(string $villeLivraison): self
  317.     {
  318.         $this->villeLivraison $villeLivraison;
  319.         return $this;
  320.     }
  321.     public function getAdresseLivraison(): ?string
  322.     {
  323.         return $this->adresseLivraison;
  324.     }
  325.     public function setAdresseLivraison(string $adresseLivraison): self
  326.     {
  327.         $this->adresseLivraison $adresseLivraison;
  328.         return $this;
  329.     }
  330.     public function getComplementAdresseLivraison(): ?string
  331.     {
  332.         return $this->complementAdresseLivraison;
  333.     }
  334.     public function setComplementAdresseLivraison(?string $complementAdresseLivraison): self
  335.     {
  336.         $this->complementAdresseLivraison $complementAdresseLivraison;
  337.         return $this;
  338.     }
  339.     public function getEtatUs(): ?string
  340.     {
  341.         return $this->etatUs;
  342.     }
  343.     public function setEtatUs(string $etatUs): self
  344.     {
  345.         $this->etatUs $etatUs;
  346.         return $this;
  347.     }
  348.     public function getState(): ?string
  349.     {
  350.         return $this->state;
  351.     }
  352.     public function setState(string $state): self
  353.     {
  354.         $this->state $state;
  355.         return $this;
  356.     }
  357.     public function getObservation(): ?string
  358.     {
  359.         return $this->observation;
  360.     }
  361.     public function setObservation(?string $observation): self
  362.     {
  363.         $this->observation $observation;
  364.         return $this;
  365.     }
  366.     public function getProvince(): ?string
  367.     {
  368.         return $this->province;
  369.     }
  370.     public function setProvince(?string $province): self
  371.     {
  372.         $this->province $province;
  373.         return $this;
  374.     }
  375.     public function getNombreBouteilleRouge(): ?int
  376.     {
  377.         return $this->nombreBouteilleRouge;
  378.     }
  379.     public function setNombreBouteilleRouge(?int $nombreBouteilleRouge): self
  380.     {
  381.         $this->nombreBouteilleRouge $nombreBouteilleRouge;
  382.         return $this;
  383.     }
  384.     public function getNombreBouteilleBlanc(): ?int
  385.     {
  386.         return $this->nombreBouteilleBlanc;
  387.     }
  388.     public function setNombreBouteilleBlanc(?int $nombreBouteilleBlanc): self
  389.     {
  390.         $this->nombreBouteilleBlanc $nombreBouteilleBlanc;
  391.         return $this;
  392.     }
  393.     public function getNombreBouteillePetillant(): ?int
  394.     {
  395.         return $this->nombreBouteillePetillant;
  396.     }
  397.     public function setNombreBouteillePetillant(?int $nombreBouteillePetillant): self
  398.     {
  399.         $this->nombreBouteillePetillant $nombreBouteillePetillant;
  400.         return $this;
  401.     }
  402.     public function getToken(): ?string
  403.     {
  404.         return $this->token;
  405.     }
  406.     public function setToken(?string $token): self
  407.     {
  408.         $this->token $token;
  409.         return $this;
  410.     }
  411.     public function getClient(): ?Client
  412.     {
  413.         return $this->client;
  414.     }
  415.     public function setClient(Client $client): self
  416.     {
  417.         $this->client $client;
  418.         return $this;
  419.     }
  420.     public function getClientFinal(): ?ClientFinal
  421.     {
  422.         return $this->clientFinal;
  423.     }
  424.     public function setClientFinal(ClientFinal $clientFinal): self
  425.     {
  426.         $this->clientFinal $clientFinal;
  427.         return $this;
  428.     }
  429.     /**
  430.      * @return Collection<int, Colis>
  431.      */
  432.     public function getColis(): Collection
  433.     {
  434.         return $this->colis;
  435.     }
  436.     public function addColi(Colis $coli): self
  437.     {
  438.         if (!$this->colis->contains($coli)) {
  439.             $this->colis[] = $coli;
  440.             $coli->setCommande($this);
  441.         }
  442.         return $this;
  443.     }
  444.     public function removeColi(Colis $coli): self
  445.     {
  446.         if ($this->colis->removeElement($coli)) {
  447.             // set the owning side to null (unless already changed)
  448.             if ($coli->getCommande() === $this) {
  449.                 $coli->setCommande(null);
  450.             }
  451.         }
  452.         return $this;
  453.     }
  454.     public function isFedexPdfGenerated(): ?bool
  455.     {
  456.         return $this->fedexPdfGenerated;
  457.     }
  458.     public function setFedexPdfGenerated(bool $fedexPdfGenerated): self
  459.     {
  460.         $this->fedexPdfGenerated $fedexPdfGenerated;
  461.         return $this;
  462.     }
  463.     public function isIsTemporaire(): ?bool
  464.     {
  465.         return $this->isTemporaire;
  466.     }
  467.     public function setIsTemporaire(bool $isTemporaire): self
  468.     {
  469.         $this->isTemporaire $isTemporaire;
  470.         return $this;
  471.     }
  472.     public function isIsValideeParClient(): ?bool
  473.     {
  474.         return $this->isValideeParClient;
  475.     }
  476.     public function setIsValideeParClient(bool $isValideeParClient): self
  477.     {
  478.         $this->isValideeParClient $isValideeParClient;
  479.         return $this;
  480.     }
  481.     public function isCommandeMassive(): ?bool
  482.     {
  483.         return $this->commandeMassive;
  484.     }
  485.     public function setCommandeMassive(bool $commandeMassive): self
  486.     {
  487.         $this->commandeMassive $commandeMassive;
  488.         return $this;
  489.     }
  490.     public function isDap(): ?bool
  491.     {
  492.         return $this->dap;
  493.     }
  494.     public function setDap(bool $dap): self
  495.     {
  496.         $this->dap $dap;
  497.         return $this;
  498.     }
  499.     public function isServicePriority(): ?bool
  500.     {
  501.         return $this->servicePriority;
  502.     }
  503.     public function setServicePriority(bool $servicePriority): self
  504.     {
  505.         $this->servicePriority $servicePriority;
  506.         return $this;
  507.     }    
  508.     public function getDateCollecte(): ?\DateTimeInterface
  509.     {
  510.         return $this->dateCollecte;
  511.     }
  512.     public function setDateCollecte(\DateTimeInterface $dateCollecte): self
  513.     {
  514.         $this->dateCollecte $dateCollecte;
  515.         return $this;
  516.     }
  517.     public function getPreviDebut()
  518.     {
  519.         return $this->previDebut;
  520.     }
  521.     public function setPreviDebut($previDebut)
  522.     {
  523.         $this->previDebut $previDebut;
  524.     }
  525.     public function getPreviFin()
  526.     {
  527.         return $this->previFin;
  528.     }
  529.     public function setPreviFin($previFin)
  530.     {
  531.         $this->previFin $previFin;
  532.     }
  533.     public function isCrenoUpdatable(){
  534.         return $this->crenoUpdatable;
  535.     }
  536.     public function setCrenoUpdatable($crenoUpdatable){
  537.         $this->crenoUpdatable $crenoUpdatable;
  538.     }
  539.     public function getNombreMagnumRouge(): ?int
  540.     {
  541.         return $this->nombreMagnumRouge;
  542.     }
  543.     public function setNombreMagnumRouge(?int $nombreMagnumRouge): self
  544.     {
  545.         $this->nombreMagnumRouge $nombreMagnumRouge;
  546.         return $this;
  547.     }
  548.     public function getNombreMagnumBlanc(): ?int
  549.     {
  550.         return $this->nombreMagnumBlanc;
  551.     }
  552.     public function setNombreMagnumBlanc(?int $nombreMagnumBlanc): self
  553.     {
  554.         $this->nombreMagnumBlanc $nombreMagnumBlanc;
  555.         return $this;
  556.     }
  557.     public function getNombreMagnumPetillant(): ?int
  558.     {
  559.         return $this->nombreMagnumPetillant;
  560.     }
  561.     public function setNombreMagnumPetillant(?int $nombreMagnumPetillant): self
  562.     {
  563.         $this->nombreMagnumPetillant $nombreMagnumPetillant;
  564.         
  565.         return $this;
  566.     }
  567.     
  568.     public function getTrackingNumber(): ?string
  569.     {
  570.         return $this->trackingNumber;
  571.     }
  572.     public function setTrackingNumber(?string $trackingNumber): self
  573.     {
  574.         $this->trackingNumber $trackingNumber;
  575.         return $this;
  576.     }
  577.     public function isFedexPdfAvailable(): ?bool
  578.     {
  579.         return $this->fedexPdfAvailable;
  580.     }
  581.     public function setFedexPdfAvailable(?bool $fedexPdfAvailable): self
  582.     {
  583.         $this->fedexPdfAvailable $fedexPdfAvailable;
  584.         return $this;
  585.     }
  586.     public function getShipDate(): ?\DateTimeInterface
  587.     {
  588.         return $this->shipDate;
  589.     }
  590.     public function setShipDate(?\DateTimeInterface $shipDate): self
  591.     {
  592.         $this->shipDate $shipDate;
  593.         return $this;
  594.     }
  595.     public function getPriorUrl(): ?string
  596.     {
  597.         return $this->priorUrl;
  598.     }
  599.     public function setPriorUrl(?string $priorUrl): self
  600.     {
  601.         $this->priorUrl $priorUrl;
  602.         return $this;
  603.     }
  604.     public function getTypeEmballage(): ?string
  605.     {
  606.         return $this->typeEmballage;
  607.     }
  608.     public function setTypeEmballage(?string $typeEmballage): self
  609.     {
  610.         $this->typeEmballage $typeEmballage;
  611.         return $this;
  612.     }
  613.     public function getIndividualTrackingNumbers(): ?string
  614.     {
  615.         return $this->individualTrackingNumbers;
  616.     }
  617.     public function setIndividualTrackingNumbers(?string $individualTrackingNumbers): self
  618.     {
  619.         $this->individualTrackingNumbers $individualTrackingNumbers;
  620.         return $this;
  621.     }
  622.     public function isFastPickup(): ?bool
  623.     {
  624.         return $this->fastPickup;
  625.     }
  626.     public function setFastPickup(?bool $fastPickup): self
  627.     {
  628.         $this->fastPickup $fastPickup;
  629.         return $this;
  630.     }
  631.     public function getFichierFactureProForma(): ?string
  632.     {
  633.         return $this->fichierFactureProForma;
  634.     }
  635.     public function setFichierFactureProForma(?string $fichierFactureProForma): self
  636.     {
  637.         $this->fichierFactureProForma $fichierFactureProForma;
  638.         return $this;
  639.     }
  640.     public function getProForma(): ?string
  641.     {
  642.         return $this->proForma;
  643.     }
  644.     public function setProForma(?string $proForma): self
  645.     {
  646.         $this->proForma $proForma;
  647.         return $this;
  648.     }      
  649.     
  650.     public function getCommandeIdPresta(): ?int
  651.     {
  652.         return $this->commandeIdPresta;
  653.     }
  654.     public function setCommandeIdPresta(?int $commandeIdPresta): self
  655.     {
  656.         $this->commandeIdPresta $commandeIdPresta;
  657.         
  658.         return $this;
  659.     }    
  660. }