src/Entity/Articles/ArticleComposant.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Articles;
  3. use App\Entity\GestionComerciale\ArticleCommande;
  4. use App\Entity\GestionComerciale\Fabrication;
  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. /**
  12.  * ArticleComposant
  13.  *
  14.  * @ORM\Table("article__article_composant")
  15.  * @ORM\Entity(repositoryClass="App\Repository\Articles\ArticleComposantRepository")
  16.  */
  17. class ArticleComposant
  18. {
  19.     /**
  20.      * @ORM\Column(name="id", type="integer")
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue(strategy="AUTO")
  23.      */
  24.     private $id;
  25.     
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="articles")
  28.      * @ORM\JoinColumn(nullable=true)
  29.      */
  30.     private $utilisateur;
  31.     
  32.     /**
  33.      * @ORM\Column(name="date", type="datetime")
  34.      */
  35.     private $date;
  36.     
  37.      /**
  38.      * @ORM\Column(name="date_supression", type="datetime", nullable=true)
  39.      */
  40.     private $dateSuppression;
  41.     
  42.      /**
  43.      * @ORM\Column(name="date_maj", type="datetime", nullable=true)
  44.      * @Gedmo\Timestampable(on="update")
  45.      */
  46.     private $dateMaj;
  47.     /**
  48.     * @ORM\ManyToOne(targetEntity="App\Entity\Articles\Article", inversedBy="articleComposant")
  49.     */
  50.     private $article;
  51.     
  52.     /**
  53.     * @ORM\ManyToOne(targetEntity="App\Entity\Articles\Article", inversedBy="articlesComposants")
  54.     */
  55.     private $articleCompose;
  56.     
  57.     /**
  58.     * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Fabrication", inversedBy="articlesComposants")
  59.     */
  60.     private $fabrication;
  61.     
  62.     /**
  63.      * @ORM\Column(name="quantite", type="float", nullable=true)
  64.      */
  65.     private $quantite;
  66.     
  67.     /**
  68.      * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\ArticleCommande", mappedBy="articleComposant")
  69.          * @ORM\JoinColumn(nullable=true)
  70.      */
  71.     private $articlesCommande;
  72.         
  73.     /**
  74.      * @ORM\Column(name="ordre", type="integer", nullable=true)
  75.      */
  76.     private $ordre;
  77.     public function getId(): int
  78.     {
  79.         return $this->id;
  80.     }
  81.     
  82.     /**
  83.      * @ORM\Column(name="id_import", type="string",length=255, nullable=true)
  84.      */
  85.     private $idImport;
  86.     
  87.     /**
  88.      * @ORM\Column(name="donnees_import", type="text", nullable=true)
  89.      */
  90.     private $donnesImport
  91.     
  92.     public function __construct()
  93.     {
  94.         $this->date             = new Datetime();
  95.         $this->articlesCommande = new ArrayCollection();
  96.     }
  97.     public function setQuantite(?int $quantite): ArticleComposant
  98.     {
  99.         $this->quantite $quantite;
  100.         return $this;
  101.     }
  102.     public function getQuantite(): ?int
  103.     {
  104.         return $this->quantite;
  105.     }
  106.     public function addArticle(Article $article): ArticleComposant
  107.     {
  108.         $this->article[] = $article;
  109.         return $this;
  110.     }
  111.     public function removeArticle(Article $article)
  112.     {
  113.         $this->article->removeElement($article);
  114.     }
  115.     public function getArticle(): ?Article
  116.     {
  117.         return $this->article;
  118.     }
  119.     public function setDate(DateTime $date): ArticleComposant
  120.     {
  121.         $this->date $date;
  122.         return $this;
  123.     }
  124.     public function getDate(): DateTime
  125.     {
  126.         return $this->date;
  127.     }
  128.     public function setDateSuppression(?DateTime $dateSuppression): ArticleComposant
  129.     {
  130.         $this->dateSuppression $dateSuppression;
  131.         return $this;
  132.     }
  133.     public function getDateSuppression(): ?DateTime
  134.     {
  135.         return $this->dateSuppression;
  136.     }
  137.     public function setDateMaj(?DateTime $dateMaj): ArticleComposant
  138.     {
  139.         $this->dateMaj $dateMaj;
  140.         return $this;
  141.     }
  142.     public function getDateMaj(): ?DateTime
  143.     {
  144.         return $this->dateMaj;
  145.     }
  146.     public function setUtilisateur(?Utilisateur $utilisateur): ArticleComposant
  147.     {
  148.         $this->utilisateur $utilisateur;
  149.         return $this;
  150.     }
  151.     public function getUtilisateur(): ?Utilisateur
  152.     {
  153.         return $this->utilisateur;
  154.     }
  155.     public function setArticle(?Article $article): ArticleComposant
  156.     {
  157.         $this->article $article;
  158.         return $this;
  159.     }
  160.     public function setArticleCompose(Article $articleCompose): ArticleComposant
  161.     {
  162.         $this->articleCompose $articleCompose;
  163.         return $this;
  164.     }
  165.     public function getArticleCompose(): Article
  166.     {
  167.         return $this->articleCompose;
  168.     }
  169.     public function setFabrication(Fabrication $fabrication): ArticleComposant
  170.     {
  171.         $this->fabrication $fabrication;
  172.         return $this;
  173.     }
  174.     public function getFabrication(): Fabrication
  175.     {
  176.         return $this->fabrication;
  177.     }
  178.     public function setIdImport(?string $idImport): ArticleComposant
  179.     {
  180.         $this->idImport $idImport;
  181.         return $this;
  182.     }
  183.     public function getIdImport(): ?string
  184.     {
  185.         return $this->idImport;
  186.     }
  187.     public function setDonnesImport(?string $donnesImport): ArticleComposant
  188.     {
  189.         $this->donnesImport $donnesImport;
  190.         return $this;
  191.     }
  192.     public function getDonnesImport(): ?string
  193.     {
  194.         return $this->donnesImport;
  195.     }
  196.     public function setOrdre(?int $ordre): ArticleComposant
  197.     {
  198.         $this->ordre $ordre;
  199.         return $this;
  200.     }
  201.     public function getOrdre(): ?int
  202.     {
  203.         return $this->ordre;
  204.     }
  205.     public function addArticlesCommande(ArticleCommande $articlesCommande): ArticleComposant
  206.     {
  207.         $this->articlesCommande[] = $articlesCommande;
  208.         return $this;
  209.     }
  210.     public function removeArticlesCommande(ArticleCommande $articlesCommande)
  211.     {
  212.         $this->articlesCommande->removeElement($articlesCommande);
  213.     }
  214.     public function getArticlesCommande(): Collection
  215.     {
  216.         return $this->articlesCommande;
  217.     }
  218. }