src/Entity/MarketPlace/StatutCommande.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Entity\MarketPlace;
  3. use App\Entity\GestionComerciale\Commande;
  4. use App\Entity\GestionComerciale\StatutFabrication;
  5. use App\Entity\Utilisateur\Utilisateur;
  6. use DateTime;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. use Doctrine\Common\Collections\Collection;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. use Symfony\Component\Validator\Constraints as Assert;
  12. use App\Annotations\SecuredEntity;
  13. /**
  14.  * StatutCommande
  15.  *
  16.  * @ORM\Table("market_place__statut_commande")
  17.  * @ORM\Entity(repositoryClass="App\Repository\MarketPlace\StatutCommandeRepository")
  18.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  19.  * @SecuredEntity (name="Statut commande", group="MARKETPLACE")
  20.  */
  21. class StatutCommande
  22. {
  23.     /**
  24.      * @ORM\Column(name="id", type="integer")
  25.      * @ORM\Id
  26.      * @ORM\GeneratedValue(strategy="AUTO")
  27.      */
  28.     private $id;
  29.     /**
  30.      * @ORM\Column(name="document_commercial_id", type="integer")
  31.      */
  32.     private $documentCommercial;
  33.     /**
  34.      * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Commande", mappedBy="statutCommandeMarketPlace")
  35.      */
  36.     private $commandes;
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\StatutCommande")
  39.      */
  40.     private $actionStatutCommande;
  41.     /**
  42.      * @ORM\Column(name="ordre", type="integer", nullable=true)
  43.      */
  44.     private $ordre;
  45.     /**
  46.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="statutCommande")
  47.      * @ORM\JoinColumn(nullable=true)
  48.      */
  49.     private $utilisateur;
  50.     /**
  51.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  52.      * @Assert\NotBlank(message="LibellĂ© obligatoire")
  53.      */
  54.     private $libelle;
  55.     /**
  56.      * @ORM\Column(name="date", type="datetime", nullable=true)
  57.      */
  58.     private $date;
  59.     /**
  60.      * @ORM\Column(name="dateMaj", type="datetime", nullable=true)
  61.      * @Gedmo\Timestampable(on="update")
  62.      */
  63.     private $dateMaj;
  64.     /**
  65.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  66.      */
  67.     private $dateSuppression;
  68.     /**
  69.      * @ORM\Column(name="origine", type="string", length=255, nullable=true)
  70.      */
  71.     private $origine;
  72.     /**
  73.      * @ORM\Column(name="reference", type="string", length=255, nullable=true)
  74.      */
  75.     private $reference;
  76.     /**
  77.      * @ORM\ManyToOne(targetEntity="App\Entity\MarketPlace\MarketPlace")
  78.      * @ORM\JoinColumn(nullable=true)
  79.      */
  80.     private $marketPlace;
  81.     public function __construct()
  82.     {
  83.         $this->date         = new Datetime();
  84.         $this->ordre        0;
  85.         $this->commandes    = new ArrayCollection();
  86.     }
  87.     public function getId(): int
  88.     {
  89.         return $this->id;
  90.     }
  91.     public function setLibelle(?string $libelle): StatutCommande
  92.     {
  93.         $this->libelle $libelle;
  94.         return $this;
  95.     }
  96.     public function getLibelle(): ?string
  97.     {
  98.         return $this->libelle;
  99.     }
  100.     public function setDate(?DateTime $date): StatutCommande
  101.     {
  102.         $this->date $date;
  103.         return $this;
  104.     }
  105.     public function getDate(): ?DateTime
  106.     {
  107.         return $this->date;
  108.     }
  109.     public function setDateMaj(?DateTime $dateMaj): StatutCommande
  110.     {
  111.         $this->dateMaj $dateMaj;
  112.         return $this;
  113.     }
  114.     public function getDateMaj(): ?DateTime
  115.     {
  116.         return $this->dateMaj;
  117.     }
  118.     public function setDateSuppression(?DateTime $dateSuppression): StatutCommande
  119.     {
  120.         $this->dateSuppression $dateSuppression;
  121.         return $this;
  122.     }
  123.     public function getDateSuppression(): ?DateTime
  124.     {
  125.         return $this->dateSuppression;
  126.     }
  127.     public function setUtilisateur(?Utilisateur $utilisateur): StatutCommande
  128.     {
  129.         $this->utilisateur $utilisateur;
  130.         return $this;
  131.     }
  132.     public function getUtilisateur(): ?Utilisateur
  133.     {
  134.         return $this->utilisateur;
  135.     }
  136.     public function addCommande(Commande $commandes): StatutCommande
  137.     {
  138.         $this->commandes[] = $commandes;
  139.         return $this;
  140.     }
  141.     public function removeCommande(Commande $commandes)
  142.     {
  143.         $this->commandes->removeElement($commandes);
  144.     }
  145.     public function getCommandes(): Collection
  146.     {
  147.         return $this->commandes;
  148.     }
  149.     public function __toString()
  150.     {
  151.         return $this->libelle;
  152.     }
  153.     public function setOrdre(?int $ordre): StatutCommande
  154.     {
  155.         $this->ordre $ordre;
  156.         return $this;
  157.     }
  158.     public function getOrdre(): ?int
  159.     {
  160.         return $this->ordre;
  161.     }
  162.     public function setActionStatutCommande(?\App\Entity\GestionComerciale\StatutCommande $actionStatutCommande null): StatutCommande
  163.     {
  164.         $this->actionStatutCommande $actionStatutCommande;
  165.         return $this;
  166.     }
  167.     public function getActionStatutCommande(): ?\App\Entity\GestionComerciale\StatutCommande
  168.     {
  169.         return $this->actionStatutCommande;
  170.     }
  171.     public function setOrigine(?string $origine): StatutCommande
  172.     {
  173.         $this->origine $origine;
  174.         return $this;
  175.     }
  176.     public function getOrigine(): ?string
  177.     {
  178.         return $this->origine;
  179.     }
  180.     public function setReference(?string $reference): StatutCommande
  181.     {
  182.         $this->reference $reference;
  183.         return $this;
  184.     }
  185.     public function getReference(): ?string
  186.     {
  187.         return $this->reference;
  188.     }
  189.     public function setMarketPlace(?MarketPlace $marketPlace): StatutCommande
  190.     {
  191.         $this->marketPlace $marketPlace;
  192.         return $this;
  193.     }
  194.     public function getMarketPlace(): ?MarketPlace
  195.     {
  196.         return $this->marketPlace;
  197.     }
  198.     public function getDocumentCommercial(): ?int
  199.     {
  200.         return $this->documentCommercial;
  201.     }
  202.     public function setDocumentCommercial(int $documentCommercial): self
  203.     {
  204.         $this->documentCommercial $documentCommercial;
  205.         return $this;
  206.     }
  207. }