src/Entity/Inventaires/ArticleInventaire.php line 22

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Inventaires;
  3. use App\Entity\Articles\Article;
  4. use App\Entity\Articles\MouvementStock;
  5. use App\Entity\Rangements\Emplacement;
  6. use App\Entity\Utilisateur\Utilisateur;
  7. use DateTime;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. use Doctrine\Common\Collections\Collection;
  10. use Doctrine\ORM\Mapping as ORM;
  11. use Gedmo\Mapping\Annotation as Gedmo;
  12. use Symfony\Component\Validator\Constraints as Assert;
  13. /**
  14.  * ArticleInventaire
  15.  *
  16.  * @ORM\Table("inventaire__article_inventaire")
  17.  * @ORM\Entity(repositoryClass="App\Repository\Inventaires\ArticleInventaireRepository")
  18.  */
  19. class ArticleInventaire
  20. {
  21.     /**
  22.      * @ORM\Column(name="id", type="integer")
  23.      * @ORM\Id
  24.      * @ORM\GeneratedValue(strategy="AUTO")
  25.      */
  26.     private $id;
  27.     
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity="App\Entity\Inventaires\Inventaire",inversedBy="articleInventaire")
  30.      * @ORM\JoinColumn(nullable=true)
  31.      */
  32.     private $inventaire;
  33.     
  34.     /**
  35.      * @ORM\ManyToOne(targetEntity="App\Entity\Articles\Article",inversedBy="articleInventaire")
  36.      * @ORM\JoinColumn(nullable=true)
  37.      */
  38.     private $article;
  39.     
  40.     /**
  41.      * @ORM\Column(name="date", type="datetime", nullable=true)
  42.      */
  43.     private $date;
  44.     
  45.     /**
  46.      * @ORM\Column(name="stock", type="float", nullable=true)
  47.      * 
  48.      */
  49.     private $stock;
  50.     
  51.     /**
  52.      * @ORM\Column(name="stock_releve", type="float", nullable=true)
  53.      * 
  54.      */
  55.     private $stockReleve;
  56.     
  57.     /**
  58.      * @ORM\Column(name="stock_article", type="float", nullable=true)
  59.      * 
  60.      */
  61.     private $stockArticle;
  62.     
  63.     /**
  64.      * @ORM\Column(name="stock_releve_nvel_empl", type="float", nullable=true)
  65.      * 
  66.      */
  67.     private $stockReleveNouvelEmplacement;
  68.     
  69.     /**
  70.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
  71.      * @ORM\JoinColumn(nullable=true)
  72.      */
  73.     private $utilisateur;
  74.     
  75.     /**
  76.     * @ORM\ManyToOne(targetEntity="App\Entity\Rangements\Emplacement")
  77.      * @ORM\JoinColumn(nullable=true)
  78.     */
  79.     private $emplacement;
  80.     
  81.     /**
  82.     * @ORM\ManyToOne(targetEntity="App\Entity\Rangements\Emplacement", cascade={"persist"})
  83.     * @ORM\JoinColumn(nullable=true)
  84.     */
  85.     private $nouvelEmplacement;
  86.     
  87.     /**
  88.     * @ORM\OneToMany(targetEntity="App\Entity\Articles\MouvementStock", cascade={"persist"}, mappedBy="articleInventaire")
  89.     */
  90.     private $mouvementsStock;
  91.     
  92.     /**
  93.      * @ORM\Column(name="numerotation", type="string", length=255, nullable=true)
  94.      */
  95.     private $numerotation;
  96.     public function __construct()
  97.     {
  98.         $this->date             = new Datetime();
  99.         $this->mouvementsStock  = new ArrayCollection();
  100.     } 
  101.     public function getId(): int
  102.     {
  103.         return $this->id;
  104.     }
  105.     public function setDate(?DateTime $date): ArticleInventaire
  106.     {
  107.         $this->date $date;
  108.         return $this;
  109.     }
  110.     public function getDate(): ?DateTime
  111.     {
  112.         return $this->date;
  113.     }
  114.     public function setInventaire(?Inventaire $inventaire): ArticleInventaire
  115.     {
  116.         $this->inventaire $inventaire;
  117.         return $this;
  118.     }
  119.     public function getInventaire(): ?Inventaire
  120.     {
  121.         return $this->inventaire;
  122.     }
  123.     public function setArticle(?Article $article): ArticleInventaire
  124.     {
  125.         $this->article $article;
  126.         return $this;
  127.     }
  128.     public function getArticle(): ?Article
  129.     {
  130.         return $this->article;
  131.     }
  132.     public function setStock(?float $stock): ArticleInventaire
  133.     {
  134.         $this->stock $stock;
  135.         return $this;
  136.     }
  137.     public function getStock(): ?float
  138.     {
  139.         return $this->stock;
  140.     }
  141.     public function setStockReleve(?float $stockReleve): ArticleInventaire
  142.     {
  143.         $this->stockReleve $stockReleve;
  144.         return $this;
  145.     }
  146.     public function getStockReleve(): ?float
  147.     {
  148.         return $this->stockReleve;
  149.     }
  150.     public function setUtilisateur(?Utilisateur $utilisateur): ArticleInventaire
  151.     {
  152.         $this->utilisateur $utilisateur;
  153.         return $this;
  154.     }
  155.     public function getUtilisateur(): ?Utilisateur
  156.     {
  157.         return $this->utilisateur;
  158.     }
  159.     public function setEmplacement(?Emplacement $emplacement): ArticleInventaire
  160.     {
  161.         $this->emplacement $emplacement;
  162.         return $this;
  163.     }
  164.     public function getEmplacement(): ?Emplacement
  165.     {
  166.         return $this->emplacement;
  167.     }
  168.     public function setStockArticle(?float $stockArticle): ArticleInventaire
  169.     {
  170.         $this->stockArticle $stockArticle;
  171.         return $this;
  172.     }
  173.     public function getStockArticle(): ?float
  174.     {
  175.         return $this->stockArticle;
  176.     }
  177.     public function addMouvementsStock(MouvementStock $mouvementsStock): ArticleInventaire
  178.     {
  179.         $this->mouvementsStock[] = $mouvementsStock;
  180.         return $this;
  181.     }
  182.     public function removeMouvementsStock(MouvementStock $mouvementsStock)
  183.     {
  184.         $this->mouvementsStock->removeElement($mouvementsStock);
  185.     }
  186.     public function getMouvementsStock(): Collection
  187.     {
  188.         return $this->mouvementsStock;
  189.     }
  190.     public function setNouvelEmplacement(?Emplacement $nouvelEmplacement): ArticleInventaire
  191.     {
  192.         $this->nouvelEmplacement $nouvelEmplacement;
  193.         return $this;
  194.     }
  195.     public function getNouvelEmplacement(): ?Emplacement
  196.     {
  197.         return $this->nouvelEmplacement;
  198.     }
  199.     public function setStockReleveNouvelEmplacement(?float $stockReleveNouvelEmplacement): ArticleInventaire
  200.     {
  201.         $this->stockReleveNouvelEmplacement $stockReleveNouvelEmplacement;
  202.         return $this;
  203.     }
  204.     public function getStockReleveNouvelEmplacement(): ?float
  205.     {
  206.         return $this->stockReleveNouvelEmplacement;
  207.     }
  208.     public function setNumerotation(?string $numerotation): ArticleInventaire
  209.     {
  210.         $this->numerotation $numerotation;
  211.         return $this;
  212.     }
  213.     public function getNumerotation(): ?string
  214.     {
  215.         return $this->numerotation;
  216.     }
  217. }