<?php
namespace App\Entity\Articles;
use App\Entity\GestionComerciale\ArticleCommande;
use App\Entity\GestionComerciale\Fabrication;
use App\Entity\Utilisateur\Utilisateur;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* ArticleComposant
*
* @ORM\Table("article__article_composant")
* @ORM\Entity(repositoryClass="App\Repository\Articles\ArticleComposantRepository")
*/
class ArticleComposant
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="articles")
* @ORM\JoinColumn(nullable=true)
*/
private $utilisateur;
/**
* @ORM\Column(name="date", type="datetime")
*/
private $date;
/**
* @ORM\Column(name="date_supression", type="datetime", nullable=true)
*/
private $dateSuppression;
/**
* @ORM\Column(name="date_maj", type="datetime", nullable=true)
* @Gedmo\Timestampable(on="update")
*/
private $dateMaj;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Articles\Article", inversedBy="articleComposant")
*/
private $article;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Articles\Article", inversedBy="articlesComposants")
*/
private $articleCompose;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Fabrication", inversedBy="articlesComposants")
*/
private $fabrication;
/**
* @ORM\Column(name="quantite", type="float", nullable=true)
*/
private $quantite;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\ArticleCommande", mappedBy="articleComposant")
* @ORM\JoinColumn(nullable=true)
*/
private $articlesCommande;
/**
* @ORM\Column(name="ordre", type="integer", nullable=true)
*/
private $ordre;
public function getId(): int
{
return $this->id;
}
/**
* @ORM\Column(name="id_import", type="string",length=255, nullable=true)
*/
private $idImport;
/**
* @ORM\Column(name="donnees_import", type="text", nullable=true)
*/
private $donnesImport;
public function __construct()
{
$this->date = new Datetime();
$this->articlesCommande = new ArrayCollection();
}
public function setQuantite(?int $quantite): ArticleComposant
{
$this->quantite = $quantite;
return $this;
}
public function getQuantite(): ?int
{
return $this->quantite;
}
public function addArticle(Article $article): ArticleComposant
{
$this->article[] = $article;
return $this;
}
public function removeArticle(Article $article)
{
$this->article->removeElement($article);
}
public function getArticle(): ?Article
{
return $this->article;
}
public function setDate(DateTime $date): ArticleComposant
{
$this->date = $date;
return $this;
}
public function getDate(): DateTime
{
return $this->date;
}
public function setDateSuppression(?DateTime $dateSuppression): ArticleComposant
{
$this->dateSuppression = $dateSuppression;
return $this;
}
public function getDateSuppression(): ?DateTime
{
return $this->dateSuppression;
}
public function setDateMaj(?DateTime $dateMaj): ArticleComposant
{
$this->dateMaj = $dateMaj;
return $this;
}
public function getDateMaj(): ?DateTime
{
return $this->dateMaj;
}
public function setUtilisateur(?Utilisateur $utilisateur): ArticleComposant
{
$this->utilisateur = $utilisateur;
return $this;
}
public function getUtilisateur(): ?Utilisateur
{
return $this->utilisateur;
}
public function setArticle(?Article $article): ArticleComposant
{
$this->article = $article;
return $this;
}
public function setArticleCompose(Article $articleCompose): ArticleComposant
{
$this->articleCompose = $articleCompose;
return $this;
}
public function getArticleCompose(): Article
{
return $this->articleCompose;
}
public function setFabrication(Fabrication $fabrication): ArticleComposant
{
$this->fabrication = $fabrication;
return $this;
}
public function getFabrication(): Fabrication
{
return $this->fabrication;
}
public function setIdImport(?string $idImport): ArticleComposant
{
$this->idImport = $idImport;
return $this;
}
public function getIdImport(): ?string
{
return $this->idImport;
}
public function setDonnesImport(?string $donnesImport): ArticleComposant
{
$this->donnesImport = $donnesImport;
return $this;
}
public function getDonnesImport(): ?string
{
return $this->donnesImport;
}
public function setOrdre(?int $ordre): ArticleComposant
{
$this->ordre = $ordre;
return $this;
}
public function getOrdre(): ?int
{
return $this->ordre;
}
public function addArticlesCommande(ArticleCommande $articlesCommande): ArticleComposant
{
$this->articlesCommande[] = $articlesCommande;
return $this;
}
public function removeArticlesCommande(ArticleCommande $articlesCommande)
{
$this->articlesCommande->removeElement($articlesCommande);
}
public function getArticlesCommande(): Collection
{
return $this->articlesCommande;
}
}