<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\ProductsRepository")
*/
class Products
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $description;
/**
* @ORM\OneToMany(targetEntity="App\Entity\MatPremiere", mappedBy="products")
*/
private $matPremieres;
/**
* @ORM\OneToMany(targetEntity="App\Entity\AdminDonneurOrdre", mappedBy="filiere")
*/
private $adminDonneurOrdres;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Transaction", mappedBy="filiere")
*/
private $transactions;
/**
* @ORM\OneToMany(targetEntity="App\Entity\LetterOfIntentToPurchase", mappedBy="filiere")
*/
private $letterOfIntentToPurchases;
/**
* @ORM\OneToMany(targetEntity="App\Entity\AdminDonneurOrdre", mappedBy="filiere1")
*/
private $adminDonneurOrdreFiliere1;
/**
* @ORM\OneToMany(targetEntity="App\Entity\AdminDonneurOrdre", mappedBy="filiere2")
*/
private $adminDonneurOrdreFiliere2;
/**
* @ORM\OneToMany(targetEntity="App\Entity\AppelDeMarge", mappedBy="filiere")
*/
private $appelDeMarges;
/**
* @ORM\OneToMany(targetEntity="App\Entity\SousJacent", mappedBy="filiere")
*/
private $sousJacents;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Operation", mappedBy="filiere")
*/
private $operations;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Quotation", mappedBy="produit")
*/
private $quotations;
/**
* @ORM\OneToMany(targetEntity="App\Entity\TraitementDsDemdDachat", mappedBy="produit")
*/
private $traitementDsDemdDachats;
/**
* @ORM\OneToMany(targetEntity="App\Entity\DemandeDeCotation", mappedBy="product")
*/
private $demandeDeCotations;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Prospect", mappedBy="produit")
*/
private $prospects;
public function __construct()
{
$this->matPremieres = new ArrayCollection();
$this->adminDonneurOrdres = new ArrayCollection();
$this->transactions = new ArrayCollection();
$this->letterOfIntentToPurchases = new ArrayCollection();
$this->adminDonneurOrdreFiliere1 = new ArrayCollection();
$this->adminDonneurOrdreFiliere2 = new ArrayCollection();
$this->appelDeMarges = new ArrayCollection();
$this->sousJacents = new ArrayCollection();
$this->operations = new ArrayCollection();
$this->quotations = new ArrayCollection();
$this->traitementDsDemdDachats = new ArrayCollection();
$this->demandeDeCotations = new ArrayCollection();
$this->prospects = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description):string
{
$this->description = $description;
return $this;
}
/**
* @return Collection|MatPremiere[]
*/
public function getMatPremieres(): Collection
{
return $this->matPremieres;
}
public function addMatPremiere(MatPremiere $matPremiere): self
{
if (!$this->matPremieres->contains($matPremiere)) {
$this->matPremieres[] = $matPremiere;
$matPremiere->setProducts($this);
}
return $this;
}
public function removeMatPremiere(MatPremiere $matPremiere): self
{
if ($this->matPremieres->contains($matPremiere)) {
$this->matPremieres->removeElement($matPremiere);
// set the owning side to null (unless already changed)
if ($matPremiere->getProducts() === $this) {
$matPremiere->setProducts(null);
}
}
return $this;
}
public function __toString()
{
return $this->name;
}
/**
* @return Collection|AdminDonneurOrdre[]
*/
public function getAdminDonneurOrdres(): Collection
{
return $this->adminDonneurOrdres;
}
public function addAdminDonneurOrdre(AdminDonneurOrdre $adminDonneurOrdre): self
{
if (!$this->adminDonneurOrdres->contains($adminDonneurOrdre)) {
$this->adminDonneurOrdres[] = $adminDonneurOrdre;
$adminDonneurOrdre->setFiliere($this);
}
return $this;
}
public function removeAdminDonneurOrdre(AdminDonneurOrdre $adminDonneurOrdre): self
{
if ($this->adminDonneurOrdres->contains($adminDonneurOrdre)) {
$this->adminDonneurOrdres->removeElement($adminDonneurOrdre);
// set the owning side to null (unless already changed)
if ($adminDonneurOrdre->getFiliere() === $this) {
$adminDonneurOrdre->setFiliere(null);
}
}
return $this;
}
/**
* @return Collection|Transaction[]
*/
public function getTransactions(): Collection
{
return $this->transactions;
}
public function addTransaction(Transaction $transaction): self
{
if (!$this->transactions->contains($transaction)) {
$this->transactions[] = $transaction;
$transaction->setFiliere($this);
}
return $this;
}
public function removeTransaction(Transaction $transaction): self
{
if ($this->transactions->contains($transaction)) {
$this->transactions->removeElement($transaction);
// set the owning side to null (unless already changed)
if ($transaction->getFiliere() === $this) {
$transaction->setFiliere(null);
}
}
return $this;
}
/**
* @return Collection|LetterOfIntentToPurchase[]
*/
public function getLetterOfIntentToPurchases(): Collection
{
return $this->letterOfIntentToPurchases;
}
public function addLetterOfIntentToPurchase(LetterOfIntentToPurchase $letterOfIntentToPurchase): self
{
if (!$this->letterOfIntentToPurchases->contains($letterOfIntentToPurchase)) {
$this->letterOfIntentToPurchases[] = $letterOfIntentToPurchase;
$letterOfIntentToPurchase->setFiliere($this);
}
return $this;
}
public function removeLetterOfIntentToPurchase(LetterOfIntentToPurchase $letterOfIntentToPurchase): self
{
if ($this->letterOfIntentToPurchases->contains($letterOfIntentToPurchase)) {
$this->letterOfIntentToPurchases->removeElement($letterOfIntentToPurchase);
// set the owning side to null (unless already changed)
if ($letterOfIntentToPurchase->getFiliere() === $this) {
$letterOfIntentToPurchase->setFiliere(null);
}
}
return $this;
}
/**
* @return Collection|AdminDonneurOrdre[]
*/
public function getAdminDonneurOrdreFiliere1(): Collection
{
return $this->adminDonneurOrdreFiliere1;
}
public function addAdminDonneurOrdreFiliere1(AdminDonneurOrdre $adminDonneurOrdreFiliere1): self
{
if (!$this->adminDonneurOrdreFiliere1->contains($adminDonneurOrdreFiliere1)) {
$this->adminDonneurOrdreFiliere1[] = $adminDonneurOrdreFiliere1;
$adminDonneurOrdreFiliere1->setFiliere1($this);
}
return $this;
}
public function removeAdminDonneurOrdreFiliere1(AdminDonneurOrdre $adminDonneurOrdreFiliere1): self
{
if ($this->adminDonneurOrdreFiliere1->contains($adminDonneurOrdreFiliere1)) {
$this->adminDonneurOrdreFiliere1->removeElement($adminDonneurOrdreFiliere1);
// set the owning side to null (unless already changed)
if ($adminDonneurOrdreFiliere1->getFiliere1() === $this) {
$adminDonneurOrdreFiliere1->setFiliere1(null);
}
}
return $this;
}
/**
* @return Collection|AdminDonneurOrdre[]
*/
public function getAdminDonneurOrdreFiliere2(): Collection
{
return $this->adminDonneurOrdreFiliere2;
}
public function addAdminDonneurOrdreFiliere2(AdminDonneurOrdre $adminDonneurOrdreFiliere2): self
{
if (!$this->adminDonneurOrdreFiliere2->contains($adminDonneurOrdreFiliere2)) {
$this->adminDonneurOrdreFiliere2[] = $adminDonneurOrdreFiliere2;
$adminDonneurOrdreFiliere2->setFiliere2($this);
}
return $this;
}
public function removeAdminDonneurOrdreFiliere2(AdminDonneurOrdre $adminDonneurOrdreFiliere2): self
{
if ($this->adminDonneurOrdreFiliere2->contains($adminDonneurOrdreFiliere2)) {
$this->adminDonneurOrdreFiliere2->removeElement($adminDonneurOrdreFiliere2);
// set the owning side to null (unless already changed)
if ($adminDonneurOrdreFiliere2->getFiliere2() === $this) {
$adminDonneurOrdreFiliere2->setFiliere2(null);
}
}
return $this;
}
/**
* @return Collection|AppelDeMarge[]
*/
public function getAppelDeMarges(): Collection
{
return $this->appelDeMarges;
}
public function addAppelDeMarge(AppelDeMarge $appelDeMarge): self
{
if (!$this->appelDeMarges->contains($appelDeMarge)) {
$this->appelDeMarges[] = $appelDeMarge;
$appelDeMarge->setFiliere($this);
}
return $this;
}
public function removeAppelDeMarge(AppelDeMarge $appelDeMarge): self
{
if ($this->appelDeMarges->contains($appelDeMarge)) {
$this->appelDeMarges->removeElement($appelDeMarge);
// set the owning side to null (unless already changed)
if ($appelDeMarge->getFiliere() === $this) {
$appelDeMarge->setFiliere(null);
}
}
return $this;
}
/**
* @return Collection|SousJacent[]
*/
public function getSousJacents(): Collection
{
return $this->sousJacents;
}
public function addSousJacent(SousJacent $sousJacent): self
{
if (!$this->sousJacents->contains($sousJacent)) {
$this->sousJacents[] = $sousJacent;
$sousJacent->setFiliere($this);
}
return $this;
}
public function removeSousJacent(SousJacent $sousJacent): self
{
if ($this->sousJacents->contains($sousJacent)) {
$this->sousJacents->removeElement($sousJacent);
// set the owning side to null (unless already changed)
if ($sousJacent->getFiliere() === $this) {
$sousJacent->setFiliere(null);
}
}
return $this;
}
/**
* @return Collection|Operation[]
*/
public function getOperations(): Collection
{
return $this->operations;
}
public function addOperation(Operation $operation): self
{
if (!$this->operations->contains($operation)) {
$this->operations[] = $operation;
$operation->setFiliere($this);
}
return $this;
}
public function removeOperation(Operation $operation): self
{
if ($this->operations->contains($operation)) {
$this->operations->removeElement($operation);
// set the owning side to null (unless already changed)
if ($operation->getFiliere() === $this) {
$operation->setFiliere(null);
}
}
return $this;
}
/**
* @return Collection|Quotation[]
*/
public function getQuotations(): Collection
{
return $this->quotations;
}
public function addQuotation(Quotation $quotation): self
{
if (!$this->quotations->contains($quotation)) {
$this->quotations[] = $quotation;
$quotation->setProduit($this);
}
return $this;
}
public function removeQuotation(Quotation $quotation): self
{
if ($this->quotations->contains($quotation)) {
$this->quotations->removeElement($quotation);
// set the owning side to null (unless already changed)
if ($quotation->getProduit() === $this) {
$quotation->setProduit(null);
}
}
return $this;
}
/**
* @return Collection|TraitementDsDemdDachat[]
*/
public function getTraitementDsDemdDachats(): Collection
{
return $this->traitementDsDemdDachats;
}
public function addTraitementDsDemdDachat(TraitementDsDemdDachat $traitementDsDemdDachat): self
{
if (!$this->traitementDsDemdDachats->contains($traitementDsDemdDachat)) {
$this->traitementDsDemdDachats[] = $traitementDsDemdDachat;
$traitementDsDemdDachat->setProduit($this);
}
return $this;
}
public function removeTraitementDsDemdDachat(TraitementDsDemdDachat $traitementDsDemdDachat): self
{
if ($this->traitementDsDemdDachats->contains($traitementDsDemdDachat)) {
$this->traitementDsDemdDachats->removeElement($traitementDsDemdDachat);
// set the owning side to null (unless already changed)
if ($traitementDsDemdDachat->getProduit() === $this) {
$traitementDsDemdDachat->setProduit(null);
}
}
return $this;
}
/**
* @return Collection|DemandeDeCotation[]
*/
public function getDemandeDeCotations(): Collection
{
return $this->demandeDeCotations;
}
public function addDemandeDeCotation(DemandeDeCotation $demandeDeCotation): self
{
if (!$this->demandeDeCotations->contains($demandeDeCotation)) {
$this->demandeDeCotations[] = $demandeDeCotation;
$demandeDeCotation->setProduct($this);
}
return $this;
}
public function removeDemandeDeCotation(DemandeDeCotation $demandeDeCotation): self
{
if ($this->demandeDeCotations->contains($demandeDeCotation)) {
$this->demandeDeCotations->removeElement($demandeDeCotation);
// set the owning side to null (unless already changed)
if ($demandeDeCotation->getProduct() === $this) {
$demandeDeCotation->setProduct(null);
}
}
return $this;
}
/**
* @return Collection|Prospect[]
*/
public function getProspects(): Collection
{
return $this->prospects;
}
public function addProspect(Prospect $prospect): self
{
if (!$this->prospects->contains($prospect)) {
$this->prospects[] = $prospect;
$prospect->setProduit($this);
}
return $this;
}
public function removeProspect(Prospect $prospect): self
{
if ($this->prospects->contains($prospect)) {
$this->prospects->removeElement($prospect);
// set the owning side to null (unless already changed)
if ($prospect->getProduit() === $this) {
$prospect->setProduit(null);
}
}
return $this;
}
}