src/Entity/Produit.php line 15
<?phpnamespace App\Entity;use App\Repository\ProduitRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ProduitRepository::class)]#[ORM\Index(columns: ['cip'], name: 'cip_idx')]#[ORM\Index(columns: ['reference'], name: 'reference_idx')]class Produit{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column]private ?int $cip = null;#[ORM\Column(length: 255)]private ?string $reference = null;#[ORM\Column(length: 255)]private ?string $description1 = null;#[ORM\Column(length: 255)]private ?string $description2 = null;#[ORM\Column(length: 255)]private ?string $description3 = null;#[ORM\Column(length: 255)]private ?string $description4 = null;#[ORM\Column(length: 255)]private ?string $description5 = null;#[ORM\Column(length: 255)]private ?string $description6 = null;#[ORM\OneToMany(mappedBy: 'produit', targetEntity: Commande400::class)]private Collection $commande400s;#[ORM\OneToMany(mappedBy: 'produit', targetEntity: Lignecommande::class)]private Collection $lignecommandes;#[ORM\ManyToOne(inversedBy: 'produits')]private ?Marque $marque = null;#[ORM\OneToMany(mappedBy: 'produit', targetEntity: Tarif::class)]private Collection $tarifs;#[ORM\OneToMany(mappedBy: 'cip', targetEntity: TarifLivre::class)]private Collection $tariflivres;#[ORM\ManyToOne(inversedBy: 'produits')]private ?TypeProduit $type = null;#[ORM\Column(type: Types::SMALLINT)]private ?int $actif = 1;#[ORM\OneToMany(mappedBy: 'code_produit', targetEntity: ReferencesArticlesAtlantic::class)]private Collection $referencesArticlesAtlantics;public function __construct(){$this->commande400s = new ArrayCollection();$this->lignecommandes = new ArrayCollection();$this->tarifs = new ArrayCollection();$this->tariflivres = new ArrayCollection();$this->referencesArticlesAtlantics = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getCip(): ?int{return $this->cip;}public function setCip(int $cip): self{$this->cip = $cip;return $this;}public function getReference(): ?string{return $this->reference;}public function setReference(string $reference): self{$this->reference = $reference;return $this;}public function getDescription1(): ?string{return $this->description1;}public function setDescription1(string $description1): self{$this->description1 = $description1;return $this;}public function getDescription2(): ?string{return $this->description2;}public function setDescription2(string $description2): self{$this->description2 = $description2;return $this;}public function getDescription3(): ?string{return $this->description3;}public function setDescription3(string $description3): self{$this->description3 = $description3;return $this;}public function getDescription4(): ?string{return $this->description4;}public function setDescription4(string $description4): self{$this->description4 = $description4;return $this;}public function getDescription5(): ?string{return $this->description5;}public function setDescription5(string $description5): self{$this->description5 = $description5;return $this;}public function getDescription6(): ?string{return $this->description6;}public function setDescription6(string $description6): self{$this->description6 = $description6;return $this;}/*** @return Collection<int, Commande400>*/public function getCommande400s(): Collection{return $this->commande400s;}public function addCommande400(Commande400 $commande400): self{if (!$this->commande400s->contains($commande400)) {$this->commande400s->add($commande400);$commande400->setProduit($this);}return $this;}public function removeCommande400(Commande400 $commande400): self{if ($this->commande400s->removeElement($commande400)) {// set the owning side to null (unless already changed)if ($commande400->getProduit() === $this) {$commande400->setProduit(null);}}return $this;}/*** @return Collection<int, Lignecommande>*/public function getLignecommandes(): Collection{return $this->lignecommandes;}public function addLignecommande(Lignecommande $lignecommande): self{if (!$this->lignecommandes->contains($lignecommande)) {$this->lignecommandes->add($lignecommande);$lignecommande->setProduit($this);}return $this;}public function removeLignecommande(Lignecommande $lignecommande): self{if ($this->lignecommandes->removeElement($lignecommande)) {// set the owning side to null (unless already changed)if ($lignecommande->getProduit() === $this) {$lignecommande->setProduit(null);}}return $this;}public function getMarque(): ?Marque{return $this->marque;}public function setMarque(?Marque $marque): self{$this->marque = $marque;return $this;}/*** @return Collection<int, Tarif>*/public function getTarifs(): Collection{return $this->tarifs;}public function addTarif(Tarif $tarif): self{if (!$this->tarifs->contains($tarif)) {$this->tarifs->add($tarif);$tarif->setProduit($this);}return $this;}public function removeTarif(Tarif $tarif): self{if ($this->tarifs->removeElement($tarif)) {// set the owning side to null (unless already changed)if ($tarif->getProduit() === $this) {$tarif->setProduit(null);}}return $this;}/*** @return Collection<int, TarifLivre>*/public function getTariflivres(): Collection{return $this->tariflivres;}public function addTariflivre(TarifLivre $tariflivre): self{if (!$this->tariflivres->contains($tariflivre)) {$this->tariflivres->add($tariflivre);$tariflivre->setCip($this);}return $this;}public function removeTariflivre(TarifLivre $tariflivre): self{if ($this->tariflivres->removeElement($tariflivre)) {// set the owning side to null (unless already changed)if ($tariflivre->getCip() === $this) {$tariflivre->setCip(null);}}return $this;}public function getType(): ?TypeProduit{return $this->type;}public function setType(?TypeProduit $type): self{$this->type = $type;return $this;}public function getActif(): ?int{return $this->actif;}public function setActif(int $actif): self{$this->actif = $actif;return $this;}/*** @return Collection<int, ReferencesArticlesAtlantic>*/public function getReferencesArticlesAtlantics(): Collection{return $this->referencesArticlesAtlantics;}public function addReferencesArticlesAtlantic(ReferencesArticlesAtlantic $referencesArticlesAtlantic): self{if (!$this->referencesArticlesAtlantics->contains($referencesArticlesAtlantic)) {$this->referencesArticlesAtlantics->add($referencesArticlesAtlantic);$referencesArticlesAtlantic->setCodeProduit($this);}return $this;}public function removeReferencesArticlesAtlantic(ReferencesArticlesAtlantic $referencesArticlesAtlantic): self{if ($this->referencesArticlesAtlantics->removeElement($referencesArticlesAtlantic)) {// set the owning side to null (unless already changed)if ($referencesArticlesAtlantic->getCodeProduit() === $this) {$referencesArticlesAtlantic->setCodeProduit(null);}}return $this;}}