src/Entity/Litiges/Litige.php line 26

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Litiges;
  3. use App\Entity\Clients\Client;
  4. use App\Entity\Fournisseurs\Fournisseur;
  5. use App\Entity\GestionComerciale\ArticleCommande;
  6. use App\Entity\GestionComerciale\Commande;
  7. use App\Entity\GestionComerciale\CommandeFournisseur;
  8. use App\Entity\Utilisateur\Utilisateur;
  9. use DateTime;
  10. use Doctrine\Common\Collections\ArrayCollection;
  11. use Doctrine\Common\Collections\Collection;
  12. use Doctrine\ORM\Mapping as ORM;
  13. use Gedmo\Mapping\Annotation as Gedmo;
  14. use Symfony\Component\Validator\Constraints as Assert;
  15. use Doctrine\ORM\Mapping\Index;
  16. /**
  17.  * Litige
  18.  *
  19.  * @ORM\Table("litige__litige")
  20.  * @ORM\Entity(repositoryClass="App\Repository\Litiges\LitigeRepository")
  21.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false) 
  22.  */
  23. class Litige
  24. {
  25.     /**
  26.      * @ORM\Column(name="id", type="integer")
  27.      * @ORM\Id
  28.      * @ORM\GeneratedValue(strategy="AUTO")
  29.      */
  30.     private $id;
  31.     
  32.     /**
  33.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
  34.      * @ORM\JoinColumn(nullable=true)
  35.      */
  36.     private $utilisateur;
  37.     
  38.     /**
  39.      * @ORM\ManyToOne(targetEntity="App\Entity\Clients\Client", inversedBy="litiges")
  40.      * @ORM\JoinColumn(nullable=true)
  41.      * @Assert\Valid
  42.      */
  43.     private $client;
  44.     
  45.     /**
  46.      * @ORM\ManyToOne(targetEntity="App\Entity\Fournisseurs\Fournisseur", inversedBy="litiges")
  47.      * @ORM\JoinColumn(nullable=true)
  48.      * @Assert\Valid
  49.      */
  50.     private $fournisseur;
  51.     
  52.     /**
  53.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\CommandeFournisseur", inversedBy="litiges")
  54.      * @ORM\JoinColumn(nullable=true)
  55.      * @Assert\Valid
  56.      */
  57.     private $commandeFournisseur;
  58.     
  59.     /**
  60.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande", inversedBy="litiges")
  61.      * @ORM\JoinColumn(nullable=true)
  62.      * @Assert\Valid
  63.      */
  64.     private $commande;
  65.     
  66.     /**
  67.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande")
  68.      * @ORM\JoinColumn(nullable=true)
  69.      * @Assert\Valid
  70.      */
  71.     private $commandeParent;
  72.     /**
  73.      * @ORM\Column(name="date", type="datetime", nullable=true)
  74.      */
  75.     private $date;
  76.     /**
  77.      * @ORM\Column(name="dateCloture", type="datetime", nullable=true)
  78.      */
  79.     private $dateCloture;
  80.     /**
  81.      * @ORM\Column(name="reference", type="string", length=255, nullable=true)
  82.      */
  83.     private $reference;
  84.     /**
  85.      * @ORM\Column(name="dateMaj", type="datetime", nullable=true)
  86.      * @Gedmo\Timestampable(on="update")     
  87.      */
  88.     private $dateMaj;
  89.     /**
  90.      * @ORM\Column(name="montant", type="float", nullable=true)
  91.      * @Assert\NotBlank(message="Montant obligatoire")     
  92.      */
  93.     private $montant;
  94.     /**
  95.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true) 
  96.      */
  97.     private $dateSuppression;
  98.     
  99.     /**
  100.      * @ORM\Column(name="statut", type="boolean", nullable=true)
  101.      */
  102.     private $statut;
  103.     
  104.     /**
  105.      * @ORM\Column(name="commentaire", type="text", nullable=true)
  106.     */
  107.     private $commentaire;
  108.     /**
  109.      * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\ArticleCommande", mappedBy="litige")
  110.      * @ORM\OrderBy({"position" = "ASC", "id" = "ASC"})
  111.      */
  112.     private $articleCommande;
  113.     public function __construct()
  114.     {
  115.         $this->date             = new Datetime();
  116.         $this->statut           false;
  117.         $this->articleCommande  = new ArrayCollection();
  118.     }
  119.     public function getId(): int
  120.     {
  121.         return $this->id;
  122.     }
  123.     public function setDate(?DateTime $date): Litige
  124.     {
  125.         $this->date $date;
  126.         return $this;
  127.     }
  128.     public function getDate(): ?DateTime
  129.     {
  130.         return $this->date;
  131.     }
  132.     public function setDateCloture(?DateTime $dateCloture): Litige
  133.     {
  134.         $this->dateCloture $dateCloture;
  135.         return $this;
  136.     }
  137.     public function getDateCloture(): ?DateTime
  138.     {
  139.         return $this->dateCloture;
  140.     }
  141.     public function setReference(?string $reference): Litige
  142.     {
  143.         $this->reference $reference;
  144.         return $this;
  145.     }
  146.     public function getReference(): ?string
  147.     {
  148.         return $this->reference;
  149.     }
  150.     public function setDateMaj(?DateTime $dateMaj): Litige
  151.     {
  152.         $this->dateMaj $dateMaj;
  153.         return $this;
  154.     }
  155.     public function getDateMaj(): ?DateTime
  156.     {
  157.         return $this->dateMaj;
  158.     }
  159.     public function setMontant(?float $montant): Litige
  160.     {
  161.         $this->montant $montant;
  162.         return $this;
  163.     }
  164.     public function getMontant(): ?float
  165.     {
  166.         return $this->montant;
  167.     }
  168.     public function setDateSuppression(?DateTime $dateSuppression): Litige
  169.     {
  170.         $this->dateSuppression $dateSuppression;
  171.         return $this;
  172.     }
  173.     public function getDateSuppression(): ?DateTime
  174.     {
  175.         return $this->dateSuppression;
  176.     }
  177.     public function setCommandeFournisseur(?CommandeFournisseur $commandeFournisseur): Litige
  178.     {
  179.         $this->commandeFournisseur $commandeFournisseur;
  180.         return $this;
  181.     }
  182.     public function getCommandeFournisseur(): ?CommandeFournisseur
  183.     {
  184.         return $this->commandeFournisseur;
  185.     }
  186.     public function setCommande(?Commande $commande): Litige
  187.     {
  188.         $this->commande $commande;
  189.         return $this;
  190.     }
  191.     public function getCommande(): ?Commande
  192.     {
  193.         return $this->commande;
  194.     }
  195.     public function setStatut(?bool $statut): Litige
  196.     {
  197.         $this->statut $statut;
  198.         return $this;
  199.     }
  200.     public function getStatut(): ?bool
  201.     {
  202.         return $this->statut;
  203.     }
  204.     public function setCommentaire(?string $commentaire): Litige
  205.     {
  206.         $this->commentaire $commentaire;
  207.         return $this;
  208.     }
  209.     public function getCommentaire(): ?string
  210.     {
  211.         return $this->commentaire;
  212.     }
  213.     public function setClient(?Client $client): Litige
  214.     {
  215.         $this->client $client;
  216.         return $this;
  217.     }
  218.     public function getClient(): ?Client
  219.     {
  220.         return $this->client;
  221.     }
  222.     public function setFournisseur(?Fournisseur $fournisseur): Litige
  223.     {
  224.         $this->fournisseur $fournisseur;
  225.         return $this;
  226.     }
  227.     public function getFournisseur(): ?Fournisseur
  228.     {
  229.         return $this->fournisseur;
  230.     }
  231.     public function setUtilisateur(?Utilisateur $utilisateur): Litige
  232.     {
  233.         $this->utilisateur $utilisateur;
  234.         return $this;
  235.     }
  236.     public function getUtilisateur(): ?Utilisateur
  237.     {
  238.         return $this->utilisateur;
  239.     }    
  240.     public function setCommandeParent(?Commande $commandeParent): Litige
  241.     {
  242.         $this->commandeParent $commandeParent;
  243.         return $this;
  244.     }
  245.     public function getCommandeParent(): ?Commande
  246.     {
  247.         return $this->commandeParent;
  248.     }
  249.     public function addArticleCommande(ArticleCommande $articleCommande): Litige
  250.     {
  251.         $this->articleCommande[] = $articleCommande;
  252.         return $this;
  253.     }
  254.     public function removeArticleCommande(ArticleCommande $articleCommande)
  255.     {
  256.         $this->articleCommande->removeElement($articleCommande);
  257.     }
  258.     public function getArticleCommande(): Collection
  259.     {
  260.         return $this->articleCommande;
  261.     }
  262. }