<?php
namespace App\Entity;
use App\Repository\ProduitsRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ProduitsRepository::class)]
class Produits
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $nom = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $coleur = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $prix = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $stock = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $image = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $dateajout = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $poid = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $description = null;
#[ORM\ManyToOne(inversedBy: 'produits')]
private ?Fournisseur $fournisseur = null;
#[ORM\ManyToOne(inversedBy: 'produits')]
private ?Tissu $tissu = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $prixht = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $tva = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $reference = null;
#[ORM\Column(nullable: true)]
private ?bool $IsArchive = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $totalepoid = null;
#[ORM\OneToMany(targetEntity: Gestiondestock::class, mappedBy: 'produit')]
private Collection $gestiondestocks;
#[ORM\Column(length: 255, nullable: true)]
private ?string $societe = null;
#[ORM\ManyToOne(inversedBy: 'produits')]
private ?Coleur $coleurs = null;
#[ORM\ManyToOne(inversedBy: 'produits')]
private ?Accessoire $accessoire = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $composition = null;
// #[ORM\Column(nullable: true)]
// private ?bool $IsTissu = null;
#[ORM\Column(name: "is_tissu", nullable: true)]
private ?bool $IsTissu = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $quantitelimite = null;
#[ORM\OneToMany(targetEntity: Articlegestion::class, mappedBy: 'produit')]
private Collection $articlegestions;
#[ORM\Column(length: 255, nullable: true)]
private ?string $totpoidlimite = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $typetissu = null;
#[ORM\OneToMany(targetEntity: Detailsproduit::class, mappedBy: 'produit', cascade: ['persist','remove'])]
private Collection $detailsproduits;
#[ORM\Column(length: 255, nullable: true)]
private ?string $nbtotalrouleaux = null;
#[ORM\OneToMany(targetEntity: Articleachat::class, mappedBy: 'produits')]
private Collection $articleachats;
#[ORM\Column(length: 255, nullable: true)]
private ?string $total = null;
#[ORM\OneToMany(targetEntity: Articlebonsortie::class, mappedBy: 'produits')]
private Collection $articlebonsorties;
public function __construct()
{
$this->gestiondestocks = new ArrayCollection();
$this->articlegestions = new ArrayCollection();
$this->detailsproduits = new ArrayCollection();
$this->articleachats = new ArrayCollection();
$this->articlebonsorties = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(?string $nom): static
{
$this->nom = $nom;
return $this;
}
public function getColeur(): ?string
{
return $this->coleur;
}
public function setColeur(?string $coleur): static
{
$this->coleur = $coleur;
return $this;
}
public function getPrix(): ?string
{
return $this->prix;
}
public function setPrix(?string $prix): void
{
$this->prix = $prix;
}
public function getStock(): ?string
{
return $this->stock;
}
public function setStock(?string $stock): static
{
$this->stock = $stock;
return $this;
}
public function getImage(): ?string
{
return $this->image;
}
public function setImage(?string $image): static
{
$this->image = $image;
return $this;
}
public function getDateajout(): ?\DateTimeInterface
{
return $this->dateajout;
}
public function setDateajout(?\DateTimeInterface $dateajout): static
{
$this->dateajout = $dateajout;
return $this;
}
public function getPoid(): ?string
{
return $this->poid;
}
public function setPoid(?string $poid): static
{
$this->poid = $poid;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): static
{
$this->description = $description;
return $this;
}
public function getFournisseur(): ?Fournisseur
{
return $this->fournisseur;
}
public function setFournisseur(?Fournisseur $fournisseur): static
{
$this->fournisseur = $fournisseur;
return $this;
}
public function getPrixht(): ?string
{
return $this->prixht;
}
public function setPrixht(?string $prixht): static
{
$this->prixht = $prixht;
return $this;
}
public function getTva(): ?string
{
return $this->tva;
}
public function setTva(?string $tva): static
{
$this->tva = $tva;
return $this;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setReference(?string $reference): static
{
$this->reference = $reference;
return $this;
}
public function isIsArchive(): ?bool
{
return $this->IsArchive;
}
public function setIsArchive(?bool $IsArchive): static
{
$this->IsArchive = $IsArchive;
return $this;
}
public function getTotalepoid(): ?string
{
return $this->totalepoid;
}
public function setTotalepoid(?string $totalepoid): static
{
$this->totalepoid = $totalepoid;
return $this;
}
/**
* @return Collection<int, Gestiondestock>
*/
public function getGestiondestocks(): Collection
{
return $this->gestiondestocks;
}
public function addGestiondestock(Gestiondestock $gestiondestock): static
{
if (!$this->gestiondestocks->contains($gestiondestock)) {
$this->gestiondestocks->add($gestiondestock);
$gestiondestock->setProduit($this);
}
return $this;
}
public function removeGestiondestock(Gestiondestock $gestiondestock): static
{
if ($this->gestiondestocks->removeElement($gestiondestock)) {
// set the owning side to null (unless already changed)
if ($gestiondestock->getProduit() === $this) {
$gestiondestock->setProduit(null);
}
}
return $this;
}
public function getSociete(): ?string
{
return $this->societe;
}
public function setSociete(?string $societe): static
{
$this->societe = $societe;
return $this;
}
public function getColeurs(): ?Coleur
{
return $this->coleurs;
}
public function setColeurs(?Coleur $coleurs): static
{
$this->coleurs = $coleurs;
return $this;
}
public function getAccessoire(): ?Accessoire
{
return $this->accessoire;
}
public function setAccessoire(?Accessoire $accessoire): static
{
$this->accessoire = $accessoire;
return $this;
}
public function getComposition(): ?string
{
return $this->composition;
}
public function setComposition(?string $composition): static
{
$this->composition = $composition;
return $this;
}
public function isIsTissu(): ?bool
{
return $this->IsTissu;
}
public function setIsTissu(?bool $IsTissu): static
{
$this->IsTissu = $IsTissu;
return $this;
}
public function getIsTissu(): ?bool
{
return $this->IsTissu;
}
public function getQuantitelimite(): ?string
{
return $this->quantitelimite;
}
public function setQuantitelimite(?string $quantitelimite): static
{
$this->quantitelimite = $quantitelimite;
return $this;
}
/**
* @return Collection<int, Articlegestion>
*/
public function getArticlegestions(): Collection
{
return $this->articlegestions;
}
public function addArticlegestion(Articlegestion $articlegestion): static
{
if (!$this->articlegestions->contains($articlegestion)) {
$this->articlegestions->add($articlegestion);
$articlegestion->setProduit($this);
}
return $this;
}
public function removeArticlegestion(Articlegestion $articlegestion): static
{
if ($this->articlegestions->removeElement($articlegestion)) {
// set the owning side to null (unless already changed)
if ($articlegestion->getProduit() === $this) {
$articlegestion->setProduit(null);
}
}
return $this;
}
public function getTotpoidlimite(): ?string
{
return $this->totpoidlimite;
}
public function setTotpoidlimite(?string $totpoidlimite): static
{
$this->totpoidlimite = $totpoidlimite;
return $this;
}
public function getTypetissu(): ?string
{
return $this->typetissu;
}
public function setTypetissu(?string $typetissu): static
{
$this->typetissu = $typetissu;
return $this;
}
/**
* @return Collection<int, DetailsProduit>
*/
public function getDetailsproduits(): Collection
{
return $this->detailsproduits;
}
public function addDetailsProduit(DetailsProduit $detailsProduit): static
{
if (!$this->detailsproduits->contains($detailsProduit)) {
$this->detailsproduits->add($detailsProduit);
$detailsProduit->setProduit($this);
}
return $this;
}
public function removeDetailsProduit(DetailsProduit $detailsproduit): static
{
if ($this->detailsproduits->removeElement($detailsproduit)) {
// set the owning side to null (unless already changed)
if ($detailsproduit->getProduit() === $this) {
$detailsproduit->setProduit(null);
}
}
return $this;
}
public function getNbtotalrouleaux(): ?string
{
return $this->nbtotalrouleaux;
}
public function setNbtotalrouleaux(?string $nbtotalrouleaux): static
{
$this->nbtotalrouleaux = $nbtotalrouleaux;
return $this;
}
/**
* @return Collection<int, Articleachat>
*/
public function getArticleachats(): Collection
{
return $this->articleachats;
}
public function addArticleachat(Articleachat $articleachat): static
{
if (!$this->articleachats->contains($articleachat)) {
$this->articleachats->add($articleachat);
$articleachat->setProduits($this);
}
return $this;
}
public function removeArticleachat(Articleachat $articleachat): static
{
if ($this->articleachats->removeElement($articleachat)) {
// set the owning side to null (unless already changed)
if ($articleachat->getProduits() === $this) {
$articleachat->setProduits(null);
}
}
return $this;
}
public function getTotal(): ?string
{
return $this->total;
}
public function setTotal(?string $total): static
{
$this->total = $total;
return $this;
}
/**
* @return Collection<int, Articlebonsortie>
*/
public function getArticlebonsorties(): Collection
{
return $this->articlebonsorties;
}
public function addArticlebonsorty(Articlebonsortie $articlebonsorty): static
{
if (!$this->articlebonsorties->contains($articlebonsorty)) {
$this->articlebonsorties->add($articlebonsorty);
$articlebonsorty->setProduits($this);
}
return $this;
}
public function removeArticlebonsorty(Articlebonsortie $articlebonsorty): static
{
if ($this->articlebonsorties->removeElement($articlebonsorty)) {
// set the owning side to null (unless already changed)
if ($articlebonsorty->getProduits() === $this) {
$articlebonsorty->setProduits(null);
}
}
return $this;
}
}