src/Entity/Commande.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\Collection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. /**
  7.  * Commande
  8.  *
  9.  * @ORM\Table(name="commande", indexes={@ORM\Index(name="fk_Commandestatut_idx", columns={"statut"}), @ORM\Index(name="fkuser_idx", columns={"id_user"})})
  10.  * @ORM\Entity(repositoryClass="App\Repository\CommandeRepository")
  11.  */
  12. class Commande
  13. {
  14.     
  15.     /**
  16.      * @var int|null
  17.      *
  18.      * @ORM\Column(name="num_comande", type="integer",length=200,nullable=true)
  19.      */
  20.     private $numComande;
  21.     /**
  22.      *
  23.      * @ORM\Column(name="montantHt" ,type="float", nullable=true)
  24.      */
  25.     private $montantht;
  26.     /**
  27.      *
  28.      * @ORM\Column(name="montanenv" ,type="float", nullable=true)
  29.      */
  30.     private $montanenv;
  31.     /**
  32.      *
  33.      * @ORM\Column(name="montantRth", type="float", nullable=true)
  34.      */
  35.     private $montantrth;
  36.     /**
  37.      * @var int|null
  38.      *
  39.      * @ORM\Column(name="traiter", type="integer", nullable=true)
  40.      */
  41.     private $traiter;
  42.     /**
  43.      *
  44.      * @ORM\Column(name="moantantTtcregl", type="float", nullable=true)
  45.      */
  46.     private $moantantTtcregl;
  47.     /**
  48.      *
  49.      * @ORM\Column(name="tva", type="decimal", precision=10, scale=0, nullable=true)
  50.      */
  51.     private $tva;
  52.     /**
  53.      * @var \User
  54.      *
  55.      * @ORM\ManyToOne(targetEntity="Sejour")
  56.      * @ORM\JoinColumns({
  57.      *   @ORM\JoinColumn(name="id_sejour", referencedColumnName="id")
  58.      * })
  59.      */
  60.     private $idSejour;
  61.     /**
  62.      * @var \User
  63.      *
  64.      * @ORM\ManyToOne(targetEntity="User")
  65.      * @ORM\JoinColumns({
  66.      *   @ORM\JoinColumn(name="id_user", referencedColumnName="id")
  67.      * })
  68.      */
  69.     private $idUser;
  70.     /**
  71.      * @var \Ref
  72.      *
  73.      * @ORM\ManyToOne(targetEntity="Ref")
  74.      * @ORM\JoinColumns({
  75.      *   @ORM\JoinColumn(name="statut", referencedColumnName="id")
  76.      * })
  77.      */
  78.     private $statut;
  79.     /**
  80.      * @var \DateTime|null
  81.      *
  82.      * @ORM\Column(name="date_create_commande", type="date", nullable=true)
  83.      */
  84.     private $dateCreateCommande;
  85.     /**
  86.      * @var \DateTime|null
  87.      *
  88.      * @ORM\Column(name="date_facture", type="date", nullable=true)
  89.      */
  90.     private $dateFacture;
  91.     /**
  92.      * @var \Adress
  93.      *
  94.      * @ORM\ManyToOne(targetEntity="Adress")
  95.      * @ORM\JoinColumns({
  96.      *   @ORM\JoinColumn(name="adresslivraison", referencedColumnName="id" )
  97.      * })
  98.      */
  99.     private $adresslivraison;
  100.     /**
  101.      * @ORM\Column(name="Jeton",type="integer", nullable=true)
  102.      */
  103.     private $jeton;
  104.     /**
  105.      * @return mixed
  106.      */
  107.     public function getJeton()
  108.     {
  109.         return $this->jeton;
  110.     }
  111.     /**
  112.      * @param mixed $jeton
  113.      */
  114.     public function setJeton($jeton): void
  115.     {
  116.         $this->jeton $jeton;
  117.     }
  118.     /**
  119.      * @var \Adress
  120.      *
  121.      * @ORM\ManyToOne(targetEntity="Adress")
  122.      * @ORM\JoinColumns({
  123.      *   @ORM\JoinColumn(name="adressfactoration", referencedColumnName="id" )
  124.      * })
  125.      */
  126.     private $adressfactoration;
  127.     /**
  128.      * @ORM\Column(name="payement_type", type="string", length=255, nullable=true)
  129.      */
  130.     private $paymentType;
  131.     /**
  132.      * @ORM\Column(name="periode", type="string", length=255, nullable=true)
  133.      */
  134.     private $periode;
  135.     /**
  136.      * @return mixed
  137.      */
  138.     public function getDupligetStatut()
  139.     {
  140.         return $this->dupligetStatut;
  141.     }
  142.     /**
  143.      * @param mixed $dupligetStatut
  144.      */
  145.     public function setDupligetStatut($dupligetStatut): void
  146.     {
  147.         //ready
  148.         //generated
  149.         //ready to send
  150.         //suspended
  151.         //sent
  152.         //dispatched
  153.         $this->dupligetStatut $dupligetStatut;
  154.     }
  155.     /**
  156.      * @ORM\Column(name="dupligetStatut", type="string", length=255, nullable=true)
  157.      */
  158.     private $dupligetStatut;
  159.     public function getPaymentType(): ?string
  160.     {
  161.         return $this->paymentType;
  162.     }
  163.     public function setPaymentType$paymentType):void
  164.     {
  165.         $this->paymentType $paymentType;
  166.     }
  167.     /**
  168.      * @return \DateTime|null
  169.      */
  170.     public function getDateCreateCommande(): ?\DateTime
  171.     {
  172.         return $this->dateCreateCommande;
  173.     }
  174.     /**
  175.      * @param \DateTime|null $dateCreateCommande
  176.      */
  177.     public function setDateCreateCommande(?\DateTime $dateCreateCommande): void
  178.     {
  179.         $this->dateCreateCommande $dateCreateCommande;
  180.     }
  181.     /**
  182.      * @var int
  183.      *
  184.      * @ORM\Column(name="id", type="integer", nullable=false)
  185.      * @ORM\Id
  186.      * @ORM\GeneratedValue(strategy="IDENTITY")
  187.      */
  188.     private $id;
  189.     /**
  190.      * @ORM\OneToMany(targetEntity="App\Entity\ComandeProduit", mappedBy="idComande")
  191.      */
  192.     private $commandesProduits;
  193.     /**
  194.      * @ORM\Column(name="revesmentpart",type="float", nullable=true)
  195.      */
  196.     private $revesmentpart;
  197.        /**
  198.      * @ORM\Column(name="remisecodepromo",type="float", nullable=true)
  199.      */
  200.     private $remisecodepromo;
  201.         /**
  202.      * @ORM\Column(name="totalBlackFriday",type="float", nullable=true)
  203.      */
  204.     private $totalBlackFriday;
  205.     /**
  206.      * @ORM\Column(name="nbconnx",type="integer", nullable=true)
  207.      */
  208.     private $nbconnx;
  209.     /**
  210.      * @ORM\Column(name="rev",type="integer", nullable=true)
  211.      */
  212.     private $rev;
  213.     /**
  214.      * @ORM\Column(name="NumSuivi",type="string", length=255, nullable=true)
  215.      */
  216.     private $NumSuivi;
  217.     /**
  218.      * @ORM\Column(name="dateLivraison",type="date", nullable=true)
  219.      */
  220.     private $dateLivraison;
  221.     /**
  222.      * @ORM\Column(name="dateExpidition",type="date", nullable=true)
  223.      */
  224.     private $dateExpidition;
  225.     /**
  226.      * @ORM\Column(name="lettreSuivi",type="string", length=255, nullable=true)
  227.      */
  228.     private $lettreSuivi;
  229.     /**
  230.      * @ORM\Column(name="addresseLivraison",type="string", length=255, nullable=true)
  231.      */
  232.     private $addresseLivraison;
  233.     /**
  234.      * @var int|null
  235.      *
  236.      * @ORM\Column(name="nbenfantencours", type="integer", nullable=true)
  237.      */
  238.     private $nbenfantencours;
  239.     
  240.     /**
  241.      * @ORM\Column(name="numfacture",type="integer", length=200, nullable=true)
  242.      */
  243.     private $numfacture;
  244.     /**
  245.      * @ORM\ManyToOne(targetEntity="App\Entity\Panier", inversedBy="commandes")
  246.      * @ORM\JoinColumns({
  247.      *  @ORM\JoinColumn(name="idPanier_id", referencedColumnName="id")
  248.      * })   
  249.      */
  250.     private $idPanier;
  251.     /**
  252.      * @ORM\OneToMany(targetEntity="App\Entity\LogPromotions", mappedBy="idCommande")
  253.      */
  254.     private $logPromotions;
  255.     /**
  256.      * @ORM\ManyToOne(targetEntity="App\Entity\Promotions", inversedBy="commandes")
  257.      */
  258.     private $idPromotion;
  259.     /**
  260.      * @ORM\ManyToOne(targetEntity="App\Entity\LogPromotions", inversedBy="commandes")
  261.      */
  262.     private $logPromo;
  263.     /**
  264.      * @ORM\OneToMany(targetEntity="App\Entity\CommandeNumerique", mappedBy="idCommande")
  265.      */
  266.     private $commandeNumeriques;
  267.     public function __construct()
  268.     {
  269.         $this->commandesProduits = new ArrayCollection();
  270.         $this->logPromotions = new ArrayCollection();
  271.         $this->commandeNumeriques = new ArrayCollection();
  272.     }
  273.     /**
  274.      * @return mixed
  275.      */
  276.     public function getCommandesProduits()
  277.     {
  278.         return $this->commandesProduits;
  279.     }
  280.     /**
  281.      * @param mixed $commandesProduits
  282.      */
  283.     public function setCommandesProduits($commandesProduits): void
  284.     {
  285.         $this->commandesProduits $commandesProduits;
  286.     }
  287.     public function getNumComande(): ?int
  288.     {
  289.         return $this->numComande;
  290.     }
  291.     public function setNumComande(?int $numComande): self
  292.     {
  293.         $this->numComande $numComande;
  294.         return $this;
  295.     }
  296.     public function getMontantht(): ?float
  297.     {
  298.         return $this->montantht;
  299.     }
  300.     public function setMontantht(?float $montantht): self
  301.     {
  302.         $this->montantht $montantht;
  303.         return $this;
  304.     }
  305.     public function getMontanenv(): ?float
  306.     {
  307.         return $this->montanenv;
  308.     }
  309.     public function setMontanenv(?float $montanenv): self
  310.     {
  311.         $this->montanenv $montanenv;
  312.         return $this;
  313.     }
  314.     
  315.     public function getMontantrth(): ?float
  316.     {
  317.         return $this->montantrth;
  318.     }
  319.     public function setMontantrth(?float $montantrth): self
  320.     {
  321.         $this->montantrth $montantrth;
  322.         return $this;
  323.     }
  324.     public function getMoantantTtcregl(): ?float
  325.     {
  326.         return $this->moantantTtcregl;
  327.     }
  328.     public function setMoantantTtcregl(?float $moantantTtcregl): self
  329.     {
  330.         $this->moantantTtcregl $moantantTtcregl;
  331.         return $this;
  332.     }
  333.     public function getTva(): ?string
  334.     {
  335.         return $this->tva;
  336.     }
  337.     public function setTva(?string $tva): self
  338.     {
  339.         $this->tva $tva;
  340.         return $this;
  341.     }
  342.     public function getIdSejour(): ?Sejour
  343.     {
  344.         return $this->idSejour;
  345.     }
  346.     public function setIdSejour(?Sejour $idSejour): self
  347.     {
  348.         $this->idSejour $idSejour;
  349.         return $this;
  350.     }
  351.     public function getIdUser(): ?User
  352.     {
  353.         return $this->idUser;
  354.     }
  355.     public function setIdUser(?User $idUser): self
  356.     {
  357.         $this->idUser $idUser;
  358.         return $this;
  359.     }
  360.     public function getStatut(): ?Ref
  361.     {
  362.         return $this->statut;
  363.     }
  364.     public function setStatut(?Ref $statut): self
  365.     {
  366.         $this->statut $statut;
  367.         return $this;
  368.     }
  369.     public function getId(): ?int
  370.     {
  371.         return $this->id;
  372.     }
  373.     public function setId(?int $id): self
  374.     {
  375.         $this->id $id;
  376.         return $this;
  377.     }
  378.     public function getRevesmentpart(): ?float
  379.     {
  380.         return $this->revesmentpart;
  381.     }
  382.     public function setRevesmentpart(?float $revesmentpart): self
  383.     {
  384.         $this->revesmentpart $revesmentpart;
  385.         return $this;
  386.     }
  387.         public function getRemisecodepromo(): ?float
  388.     {
  389.         return $this->remisecodepromo;
  390.     }
  391.     public function setRemisecodepromo(?float $remisecodepromo): self
  392.     {
  393.         $this->remisecodepromo $remisecodepromo;
  394.         return $this;
  395.     }
  396.     public function getNbconnx(): ?int
  397.     {
  398.         return $this->nbconnx;
  399.     }
  400.     public function setNbconnx(?int $nbconnx): self
  401.     {
  402.         $this->nbconnx $nbconnx;
  403.         return $this;
  404.     }
  405.     public function getRev(): ?int
  406.     {
  407.         return $this->rev;
  408.     }
  409.     public function setRev(?int $rev): self
  410.     {
  411.         $this->rev $rev;
  412.         return $this;
  413.     }
  414.     public function getNumSuivi(): ?string
  415.     {
  416.         return $this->NumSuivi;
  417.     }
  418.     public function setNumSuivi(?string $NumSuivi): self
  419.     {
  420.         $this->NumSuivi $NumSuivi;
  421.         return $this;
  422.     }
  423.     public function getDateLivraison(): ?\DateTimeInterface
  424.     {
  425.         return $this->dateLivraison;
  426.     }
  427.     public function setDateLivraison(?\DateTimeInterface $dateLivraison): self
  428.     {
  429.         $this->dateLivraison $dateLivraison;
  430.         return $this;
  431.     }
  432.     public function getDateExpidition(): ?\DateTimeInterface
  433.     {
  434.         return $this->dateExpidition;
  435.     }
  436.     public function setDateExpidition(?\DateTimeInterface $dateExpidition): self
  437.     {
  438.         $this->dateExpidition $dateExpidition;
  439.         return $this;
  440.     }
  441.     public function getLettreSuivi(): ?string
  442.     {
  443.         return $this->lettreSuivi;
  444.     }
  445.     public function setLettreSuivi(?string $lettreSuivi): self
  446.     {
  447.         $this->lettreSuivi $lettreSuivi;
  448.         return $this;
  449.     }
  450.     public function getAddresseLivraison(): ?string
  451.     {
  452.         return $this->addresseLivraison;
  453.     }
  454.     public function setAddresseLivraison(?string $addresseLivraison): self
  455.     {
  456.         $this->addresseLivraison $addresseLivraison;
  457.         return $this;
  458.     }
  459.     public function getNumfacture(): ?string
  460.     {
  461.         return $this->numfacture;
  462.     }
  463.     public function setNumfacture(?string $numfacture): self
  464.     {
  465.         $this->numfacture $numfacture;
  466.         return $this;
  467.     }
  468.     public function getIdPanier(): ?Panier
  469.     {
  470.         return $this->idPanier;
  471.     }
  472.     public function setIdPanier(?Panier $idPanier): self
  473.     {
  474.         $this->idPanier $idPanier;
  475.         return $this;
  476.     }
  477.     public function getAdresslivraison(): ?Adress
  478.     {
  479.         return $this->adresslivraison;
  480.     }
  481.     public function setAdresslivraison(?Adress $adresslivraison): self
  482.     {
  483.         $this->adresslivraison $adresslivraison;
  484.         return $this;
  485.     }
  486.     public function getAdressfactoration(): ?Adress
  487.     {
  488.         return $this->adressfactoration;
  489.     }
  490.     public function setAdressfactoration(?Adress $adressfactoration): self
  491.     {
  492.         $this->adressfactoration $adressfactoration;
  493.         return $this;
  494.     }
  495.     /**
  496.      * @return \DateTime|null
  497.      */
  498.     public function getDateFacture(): ?\DateTime
  499.     {
  500.         return $this->dateFacture;
  501.     }
  502.     /**
  503.      * @param \DateTime|null $dateFacture
  504.      */
  505.     public function setDateFacture(?\DateTime $dateFacture): void
  506.     {
  507.         $this->dateFacture $dateFacture;
  508.     }
  509.     /**
  510.      * @return int|null
  511.      */
  512.     public function getTraiter(): ?int
  513.     {
  514.         return $this->traiter;
  515.     }
  516.     /**
  517.      * @param int|null $traiter
  518.      */
  519.     public function setTraiter(?int $traiter): void
  520.     {
  521.         $this->traiter $traiter;
  522.     }
  523.     /**
  524.      * @return mixed
  525.      */
  526.     public function getPeriode()
  527.     {
  528.         return $this->periode;
  529.     }
  530.     /**
  531.      * @param mixed $periode
  532.      */
  533.     public function setPeriode($periode): void
  534.     {
  535.         $this->periode $periode;
  536.     }
  537.     /**
  538.      * @return int|null
  539.      */
  540.     public function getNbenfantencours(): ?int
  541.     {
  542.         return $this->nbenfantencours;
  543.     }
  544.     /**
  545.      * @param int|null $nbenfantencours
  546.      */
  547.     public function setNbenfantencours(?int $nbenfantencours): void
  548.     {
  549.         $this->nbenfantencours $nbenfantencours;
  550.     }
  551.     
  552.     /**
  553.      * Get the value of totalBlackFriday
  554.      */ 
  555.     public function getTotalBlackFriday()
  556.     {
  557.         return $this->totalBlackFriday;
  558.     }
  559.     /**
  560.      * Set the value of totalBlackFriday
  561.      *
  562.      * @return  self
  563.      */ 
  564.     public function setTotalBlackFriday($totalBlackFriday)
  565.     {
  566.         $this->totalBlackFriday $totalBlackFriday;
  567.         return $this;
  568.     }
  569.     /**
  570.      * @return Collection|LogPromotions[]
  571.      */
  572.     public function getLogPromotions(): Collection
  573.     {
  574.         return $this->logPromotions;
  575.     }
  576.     public function addLogPromotion(LogPromotions $logPromotion): self
  577.     {
  578.         if (!$this->logPromotions->contains($logPromotion)) {
  579.             $this->logPromotions[] = $logPromotion;
  580.             $logPromotion->setIdCommande($this);
  581.         }
  582.         return $this;
  583.     }
  584.     public function removeLogPromotion(LogPromotions $logPromotion): self
  585.     {
  586.         if ($this->logPromotions->contains($logPromotion)) {
  587.             $this->logPromotions->removeElement($logPromotion);
  588.             // set the owning side to null (unless already changed)
  589.             if ($logPromotion->getIdCommande() === $this) {
  590.                 $logPromotion->setIdCommande(null);
  591.             }
  592.         }
  593.         return $this;
  594.     }
  595.     public function getIdPromotion(): ?Promotions
  596.     {
  597.         return $this->idPromotion;
  598.     }
  599.     public function setIdPromotion(?Promotions $idPromotion): self
  600.     {
  601.         $this->idPromotion $idPromotion;
  602.         return $this;
  603.     }
  604.     public function getLogPromo(): ?LogPromotions
  605.     {
  606.         return $this->logPromo;
  607.     }
  608.     public function setLogPromo(?LogPromotions $logPromo): self
  609.     {
  610.         $this->logPromo $logPromo;
  611.         return $this;
  612.     }
  613.     /**
  614.      * @return Collection|CommandeNumerique[]
  615.      */
  616.     public function getCommandeNumeriques(): Collection
  617.     {
  618.         return $this->commandeNumeriques;
  619.     }
  620.     public function addCommandeNumerique(CommandeNumerique $commandeNumerique): self
  621.     {
  622.         if (!$this->commandeNumeriques->contains($commandeNumerique)) {
  623.             $this->commandeNumeriques[] = $commandeNumerique;
  624.             $commandeNumerique->setIdCommande($this);
  625.         }
  626.         return $this;
  627.     }
  628.     public function removeCommandeNumerique(CommandeNumerique $commandeNumerique): self
  629.     {
  630.         if ($this->commandeNumeriques->contains($commandeNumerique)) {
  631.             $this->commandeNumeriques->removeElement($commandeNumerique);
  632.             // set the owning side to null (unless already changed)
  633.             if ($commandeNumerique->getIdCommande() === $this) {
  634.                 $commandeNumerique->setIdCommande(null);
  635.             }
  636.         }
  637.         return $this;
  638.     }
  639. }