src/Entity/Produits.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProduitsRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassProduitsRepository::class)]
  9. class Produits
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255nullabletrue)]
  16.     private ?string $nom null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $coleur null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $prix null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $stock null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $image null;
  25.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  26.     private ?\DateTimeInterface $dateajout null;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     private ?string $poid null;
  29.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  30.     private ?string $description null;
  31.     #[ORM\ManyToOne(inversedBy'produits')]
  32.     private ?Fournisseur $fournisseur null;
  33.     #[ORM\ManyToOne(inversedBy'produits')]
  34.     private ?Tissu $tissu null;
  35.     #[ORM\Column(length255nullabletrue)]
  36.     private ?string $prixht null;
  37.     #[ORM\Column(length255nullabletrue)]
  38.     private ?string $tva null;
  39.     #[ORM\Column(length255nullabletrue)]
  40.     private ?string $reference null;
  41.     #[ORM\Column(nullabletrue)]
  42.     private ?bool $IsArchive null;
  43.     #[ORM\Column(length255nullabletrue)]
  44.     private ?string $totalepoid null;
  45.     #[ORM\OneToMany(targetEntityGestiondestock::class, mappedBy'produit')]
  46.     private Collection $gestiondestocks;
  47.     #[ORM\Column(length255nullabletrue)]
  48.     private ?string $societe null;
  49.     #[ORM\ManyToOne(inversedBy'produits')]
  50.     private ?Coleur $coleurs null;
  51.     #[ORM\ManyToOne(inversedBy'produits')]
  52.     private ?Accessoire $accessoire null;
  53.     #[ORM\Column(length255nullabletrue)]
  54.     private ?string $composition null;
  55. //    #[ORM\Column(nullable: true)]
  56. //    private ?bool $IsTissu = null;
  57.     #[ORM\Column(name"is_tissu"nullabletrue)]
  58.     private ?bool $IsTissu null;
  59.     #[ORM\Column(length255nullabletrue)]
  60.     private ?string $quantitelimite null;
  61.     #[ORM\OneToMany(targetEntityArticlegestion::class, mappedBy'produit')]
  62.     private Collection $articlegestions;
  63.     #[ORM\Column(length255nullabletrue)]
  64.     private ?string $totpoidlimite null;
  65.     #[ORM\Column(length255nullabletrue)]
  66.     private ?string $typetissu null;
  67.     #[ORM\OneToMany(targetEntityDetailsproduit::class, mappedBy'produit',  cascade: ['persist','remove'])]
  68.     private Collection $detailsproduits;
  69.     #[ORM\Column(length255nullabletrue)]
  70.     private ?string $nbtotalrouleaux null;
  71.     #[ORM\OneToMany(targetEntityArticleachat::class, mappedBy'produits')]
  72.     private Collection $articleachats;
  73.     #[ORM\Column(length255nullabletrue)]
  74.     private ?string $total null;
  75.     #[ORM\OneToMany(targetEntityArticlebonsortie::class, mappedBy'produits')]
  76.     private Collection $articlebonsorties;
  77.     public function __construct()
  78.     {
  79.         $this->gestiondestocks = new ArrayCollection();
  80.         $this->articlegestions = new ArrayCollection();
  81.         $this->detailsproduits = new ArrayCollection();
  82.         $this->articleachats = new ArrayCollection();
  83.         $this->articlebonsorties = new ArrayCollection();
  84.     }
  85.     public function getId(): ?int
  86.     {
  87.         return $this->id;
  88.     }
  89.     public function getNom(): ?string
  90.     {
  91.         return $this->nom;
  92.     }
  93.     public function setNom(?string $nom): static
  94.     {
  95.         $this->nom $nom;
  96.         return $this;
  97.     }
  98.     public function getColeur(): ?string
  99.     {
  100.         return $this->coleur;
  101.     }
  102.     public function setColeur(?string $coleur): static
  103.     {
  104.         $this->coleur $coleur;
  105.         return $this;
  106.     }
  107.     public function getPrix(): ?string
  108.     {
  109.         return $this->prix;
  110.     }
  111.     public function setPrix(?string $prix): void
  112.     {
  113.         $this->prix $prix;
  114.     }
  115.     public function getStock(): ?string
  116.     {
  117.         return $this->stock;
  118.     }
  119.     public function setStock(?string $stock): static
  120.     {
  121.         $this->stock $stock;
  122.         return $this;
  123.     }
  124.     public function getImage(): ?string
  125.     {
  126.         return $this->image;
  127.     }
  128.     public function setImage(?string $image): static
  129.     {
  130.         $this->image $image;
  131.         return $this;
  132.     }
  133.     public function getDateajout(): ?\DateTimeInterface
  134.     {
  135.         return $this->dateajout;
  136.     }
  137.     public function setDateajout(?\DateTimeInterface $dateajout): static
  138.     {
  139.         $this->dateajout $dateajout;
  140.         return $this;
  141.     }
  142.     public function getPoid(): ?string
  143.     {
  144.         return $this->poid;
  145.     }
  146.     public function setPoid(?string $poid): static
  147.     {
  148.         $this->poid $poid;
  149.         return $this;
  150.     }
  151.     public function getDescription(): ?string
  152.     {
  153.         return $this->description;
  154.     }
  155.     public function setDescription(?string $description): static
  156.     {
  157.         $this->description $description;
  158.         return $this;
  159.     }
  160.     public function getFournisseur(): ?Fournisseur
  161.     {
  162.         return $this->fournisseur;
  163.     }
  164.     public function setFournisseur(?Fournisseur $fournisseur): static
  165.     {
  166.         $this->fournisseur $fournisseur;
  167.         return $this;
  168.     }
  169.     public function getPrixht(): ?string
  170.     {
  171.         return $this->prixht;
  172.     }
  173.     public function setPrixht(?string $prixht): static
  174.     {
  175.         $this->prixht $prixht;
  176.         return $this;
  177.     }
  178.     public function getTva(): ?string
  179.     {
  180.         return $this->tva;
  181.     }
  182.     public function setTva(?string $tva): static
  183.     {
  184.         $this->tva $tva;
  185.         return $this;
  186.     }
  187.     public function getReference(): ?string
  188.     {
  189.         return $this->reference;
  190.     }
  191.     public function setReference(?string $reference): static
  192.     {
  193.         $this->reference $reference;
  194.         return $this;
  195.     }
  196.     public function isIsArchive(): ?bool
  197.     {
  198.         return $this->IsArchive;
  199.     }
  200.     public function setIsArchive(?bool $IsArchive): static
  201.     {
  202.         $this->IsArchive $IsArchive;
  203.         return $this;
  204.     }
  205.     public function getTotalepoid(): ?string
  206.     {
  207.         return $this->totalepoid;
  208.     }
  209.     public function setTotalepoid(?string $totalepoid): static
  210.     {
  211.         $this->totalepoid $totalepoid;
  212.         return $this;
  213.     }
  214.     /**
  215.      * @return Collection<int, Gestiondestock>
  216.      */
  217.     public function getGestiondestocks(): Collection
  218.     {
  219.         return $this->gestiondestocks;
  220.     }
  221.     public function addGestiondestock(Gestiondestock $gestiondestock): static
  222.     {
  223.         if (!$this->gestiondestocks->contains($gestiondestock)) {
  224.             $this->gestiondestocks->add($gestiondestock);
  225.             $gestiondestock->setProduit($this);
  226.         }
  227.         return $this;
  228.     }
  229.     public function removeGestiondestock(Gestiondestock $gestiondestock): static
  230.     {
  231.         if ($this->gestiondestocks->removeElement($gestiondestock)) {
  232.             // set the owning side to null (unless already changed)
  233.             if ($gestiondestock->getProduit() === $this) {
  234.                 $gestiondestock->setProduit(null);
  235.             }
  236.         }
  237.         return $this;
  238.     }
  239.     public function getSociete(): ?string
  240.     {
  241.         return $this->societe;
  242.     }
  243.     public function setSociete(?string $societe): static
  244.     {
  245.         $this->societe $societe;
  246.         return $this;
  247.     }
  248.     public function getColeurs(): ?Coleur
  249.     {
  250.         return $this->coleurs;
  251.     }
  252.     public function setColeurs(?Coleur $coleurs): static
  253.     {
  254.         $this->coleurs $coleurs;
  255.         return $this;
  256.     }
  257.     public function getAccessoire(): ?Accessoire
  258.     {
  259.         return $this->accessoire;
  260.     }
  261.     public function setAccessoire(?Accessoire $accessoire): static
  262.     {
  263.         $this->accessoire $accessoire;
  264.         return $this;
  265.     }
  266.     public function getComposition(): ?string
  267.     {
  268.         return $this->composition;
  269.     }
  270.     public function setComposition(?string $composition): static
  271.     {
  272.         $this->composition $composition;
  273.         return $this;
  274.     }
  275.     public function isIsTissu(): ?bool
  276.     {
  277.         return $this->IsTissu;
  278.     }
  279.     public function setIsTissu(?bool $IsTissu): static
  280.     {
  281.         $this->IsTissu $IsTissu;
  282.         return $this;
  283.     }
  284.     public function getIsTissu(): ?bool
  285.     {
  286.         return $this->IsTissu;
  287.     }
  288.     public function getQuantitelimite(): ?string
  289.     {
  290.         return $this->quantitelimite;
  291.     }
  292.     public function setQuantitelimite(?string $quantitelimite): static
  293.     {
  294.         $this->quantitelimite $quantitelimite;
  295.         return $this;
  296.     }
  297.     /**
  298.      * @return Collection<int, Articlegestion>
  299.      */
  300.     public function getArticlegestions(): Collection
  301.     {
  302.         return $this->articlegestions;
  303.     }
  304.     public function addArticlegestion(Articlegestion $articlegestion): static
  305.     {
  306.         if (!$this->articlegestions->contains($articlegestion)) {
  307.             $this->articlegestions->add($articlegestion);
  308.             $articlegestion->setProduit($this);
  309.         }
  310.         return $this;
  311.     }
  312.     public function removeArticlegestion(Articlegestion $articlegestion): static
  313.     {
  314.         if ($this->articlegestions->removeElement($articlegestion)) {
  315.             // set the owning side to null (unless already changed)
  316.             if ($articlegestion->getProduit() === $this) {
  317.                 $articlegestion->setProduit(null);
  318.             }
  319.         }
  320.         return $this;
  321.     }
  322.     public function getTotpoidlimite(): ?string
  323.     {
  324.         return $this->totpoidlimite;
  325.     }
  326.     public function setTotpoidlimite(?string $totpoidlimite): static
  327.     {
  328.         $this->totpoidlimite $totpoidlimite;
  329.         return $this;
  330.     }
  331.     public function getTypetissu(): ?string
  332.     {
  333.         return $this->typetissu;
  334.     }
  335.     public function setTypetissu(?string $typetissu): static
  336.     {
  337.         $this->typetissu $typetissu;
  338.         return $this;
  339.     }
  340.     /**
  341.      * @return Collection<int, DetailsProduit>
  342.      */
  343.     public function getDetailsproduits(): Collection
  344.     {
  345.         return $this->detailsproduits;
  346.     }
  347.     public function addDetailsProduit(DetailsProduit $detailsProduit): static
  348.     {
  349.         if (!$this->detailsproduits->contains($detailsProduit)) {
  350.             $this->detailsproduits->add($detailsProduit);
  351.             $detailsProduit->setProduit($this);
  352.         }
  353.         return $this;
  354.     }
  355.     public function removeDetailsProduit(DetailsProduit $detailsproduit): static
  356.     {
  357.         if ($this->detailsproduits->removeElement($detailsproduit)) {
  358.             // set the owning side to null (unless already changed)
  359.             if ($detailsproduit->getProduit() === $this) {
  360.                 $detailsproduit->setProduit(null);
  361.             }
  362.         }
  363.         return $this;
  364.     }
  365.     public function getNbtotalrouleaux(): ?string
  366.     {
  367.         return $this->nbtotalrouleaux;
  368.     }
  369.     public function setNbtotalrouleaux(?string $nbtotalrouleaux): static
  370.     {
  371.         $this->nbtotalrouleaux $nbtotalrouleaux;
  372.         return $this;
  373.     }
  374.     /**
  375.      * @return Collection<int, Articleachat>
  376.      */
  377.     public function getArticleachats(): Collection
  378.     {
  379.         return $this->articleachats;
  380.     }
  381.     public function addArticleachat(Articleachat $articleachat): static
  382.     {
  383.         if (!$this->articleachats->contains($articleachat)) {
  384.             $this->articleachats->add($articleachat);
  385.             $articleachat->setProduits($this);
  386.         }
  387.         return $this;
  388.     }
  389.     public function removeArticleachat(Articleachat $articleachat): static
  390.     {
  391.         if ($this->articleachats->removeElement($articleachat)) {
  392.             // set the owning side to null (unless already changed)
  393.             if ($articleachat->getProduits() === $this) {
  394.                 $articleachat->setProduits(null);
  395.             }
  396.         }
  397.         return $this;
  398.     }
  399.     public function getTotal(): ?string
  400.     {
  401.         return $this->total;
  402.     }
  403.     public function setTotal(?string $total): static
  404.     {
  405.         $this->total $total;
  406.         return $this;
  407.     }
  408.     /**
  409.      * @return Collection<int, Articlebonsortie>
  410.      */
  411.     public function getArticlebonsorties(): Collection
  412.     {
  413.         return $this->articlebonsorties;
  414.     }
  415.     public function addArticlebonsorty(Articlebonsortie $articlebonsorty): static
  416.     {
  417.         if (!$this->articlebonsorties->contains($articlebonsorty)) {
  418.             $this->articlebonsorties->add($articlebonsorty);
  419.             $articlebonsorty->setProduits($this);
  420.         }
  421.         return $this;
  422.     }
  423.     public function removeArticlebonsorty(Articlebonsortie $articlebonsorty): static
  424.     {
  425.         if ($this->articlebonsorties->removeElement($articlebonsorty)) {
  426.             // set the owning side to null (unless already changed)
  427.             if ($articlebonsorty->getProduits() === $this) {
  428.                 $articlebonsorty->setProduits(null);
  429.             }
  430.         }
  431.         return $this;
  432.     }
  433. }