src/Entity/Unite.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\UniteRepository")
  8.  */
  9. class Unite
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255)
  19.      */
  20.     private $nom;
  21.     /**
  22.      * @ORM\ManyToMany(targetEntity="App\Entity\SousJacent", mappedBy="px_unite")
  23.      */
  24.     private $sousJacents;
  25.     /**
  26.      * @ORM\OneToMany(targetEntity="App\Entity\AdminDonneurOrdre", mappedBy="unite")
  27.      */
  28.     private $adminDonneurOrdres;
  29.     /**
  30.      * @ORM\OneToMany(targetEntity="App\Entity\Transaction", mappedBy="total_unite")
  31.      */
  32.     private $transactions;
  33.     /**
  34.      * @ORM\OneToMany(targetEntity="App\Entity\Operation", mappedBy="unite")
  35.      */
  36.     private $operations;
  37.     /**
  38.      * @ORM\OneToMany(targetEntity="App\Entity\FraisDeCourtage", mappedBy="unite")
  39.      */
  40.     private $fraisDeCourtages;
  41.     /**
  42.      * @ORM\OneToMany(targetEntity="App\Entity\AppelDeMarge", mappedBy="unite")
  43.      */
  44.     private $appelDeMarges;
  45.     /**
  46.      * @ORM\OneToMany(targetEntity="App\Entity\SousJacent", mappedBy="qt_min_unite")
  47.      */
  48.     private $qt_min_unite;
  49.     /**
  50.      * @ORM\OneToMany(targetEntity="App\Entity\SousJacent", mappedBy="unite3")
  51.      */
  52.     private $unite3;
  53.     /**
  54.      * @ORM\OneToMany(targetEntity="App\Entity\LetterOfIntentToPurchase", mappedBy="qt_unite")
  55.      */
  56.     private $letterOfIntentToPurchases;
  57.     /**
  58.      * @ORM\Column(type="text", nullable=true)
  59.      */
  60.     private $description;
  61.     /**
  62.      * @ORM\OneToMany(targetEntity="App\Entity\Transaction", mappedBy="unite_paa")
  63.      */
  64.     private $transactions_unite;
  65.     /**
  66.      * @ORM\OneToMany(targetEntity="App\Entity\Quotation", mappedBy="unite")
  67.      */
  68.     private $quotations;
  69.     public function __construct()
  70.     {
  71.         $this->sousJacents = new ArrayCollection();
  72.         $this->adminDonneurOrdres = new ArrayCollection();
  73.         $this->transactions = new ArrayCollection();
  74.         $this->operations = new ArrayCollection();
  75.         $this->fraisDeCourtages = new ArrayCollection();
  76.         $this->appelDeMarges = new ArrayCollection();
  77.         $this->qt_min_unite = new ArrayCollection();
  78.         $this->unite3 = new ArrayCollection();
  79.         $this->letterOfIntentToPurchases = new ArrayCollection();
  80.         $this->transactions_unite = new ArrayCollection();
  81.         $this->quotations = new ArrayCollection();
  82.     }
  83.     public function getId(): ?int
  84.     {
  85.         return $this->id;
  86.     }
  87.     public function getNom(): ?string
  88.     {
  89.         return $this->nom;
  90.     }
  91.     public function setNom(string $nom): self
  92.     {
  93.         $this->nom $nom;
  94.         return $this;
  95.     }
  96.     public function __toString(){
  97.         return $this->nom;
  98.     }
  99.     /**
  100.      * @return Collection|SousJacent[]
  101.      */
  102.     public function getSousJacents(): Collection
  103.     {
  104.         return $this->sousJacents;
  105.     }
  106.     public function addSousJacent(SousJacent $sousJacent): self
  107.     {
  108.         if (!$this->sousJacents->contains($sousJacent)) {
  109.             $this->sousJacents[] = $sousJacent;
  110.             $sousJacent->addPxUnite($this);
  111.         }
  112.         return $this;
  113.     }
  114.     public function removeSousJacent(SousJacent $sousJacent): self
  115.     {
  116.         if ($this->sousJacents->contains($sousJacent)) {
  117.             $this->sousJacents->removeElement($sousJacent);
  118.             $sousJacent->removePxUnite($this);
  119.         }
  120.         return $this;
  121.     }
  122.     /**
  123.      * @return Collection|AdminDonneurOrdre[]
  124.      */
  125.     public function getAdminDonneurOrdres(): Collection
  126.     {
  127.         return $this->adminDonneurOrdres;
  128.     }
  129.     public function addAdminDonneurOrdre(AdminDonneurOrdre $adminDonneurOrdre): self
  130.     {
  131.         if (!$this->adminDonneurOrdres->contains($adminDonneurOrdre)) {
  132.             $this->adminDonneurOrdres[] = $adminDonneurOrdre;
  133.             $adminDonneurOrdre->setUnite($this);
  134.         }
  135.         return $this;
  136.     }
  137.     public function removeAdminDonneurOrdre(AdminDonneurOrdre $adminDonneurOrdre): self
  138.     {
  139.         if ($this->adminDonneurOrdres->contains($adminDonneurOrdre)) {
  140.             $this->adminDonneurOrdres->removeElement($adminDonneurOrdre);
  141.             // set the owning side to null (unless already changed)
  142.             if ($adminDonneurOrdre->getUnite() === $this) {
  143.                 $adminDonneurOrdre->setUnite(null);
  144.             }
  145.         }
  146.         return $this;
  147.     }
  148.     /**
  149.      * @return Collection|Transaction[]
  150.      */
  151.     public function getTransactions(): Collection
  152.     {
  153.         return $this->transactions;
  154.     }
  155.     public function addTransaction(Transaction $transaction): self
  156.     {
  157.         if (!$this->transactions->contains($transaction)) {
  158.             $this->transactions[] = $transaction;
  159.             $transaction->setTotalUnite($this);
  160.         }
  161.         return $this;
  162.     }
  163.     public function removeTransaction(Transaction $transaction): self
  164.     {
  165.         if ($this->transactions->contains($transaction)) {
  166.             $this->transactions->removeElement($transaction);
  167.             // set the owning side to null (unless already changed)
  168.             if ($transaction->getTotalUnite() === $this) {
  169.                 $transaction->setTotalUnite(null);
  170.             }
  171.         }
  172.         return $this;
  173.     }
  174.     /**
  175.      * @return Collection|Operation[]
  176.      */
  177.     public function getOperations(): Collection
  178.     {
  179.         return $this->operations;
  180.     }
  181.     public function addOperation(Operation $operation): self
  182.     {
  183.         if (!$this->operations->contains($operation)) {
  184.             $this->operations[] = $operation;
  185.             $operation->setUnite($this);
  186.         }
  187.         return $this;
  188.     }
  189.     public function removeOperation(Operation $operation): self
  190.     {
  191.         if ($this->operations->contains($operation)) {
  192.             $this->operations->removeElement($operation);
  193.             // set the owning side to null (unless already changed)
  194.             if ($operation->getUnite() === $this) {
  195.                 $operation->setUnite(null);
  196.             }
  197.         }
  198.         return $this;
  199.     }
  200.     /**
  201.      * @return Collection|FraisDeCourtage[]
  202.      */
  203.     public function getFraisDeCourtages(): Collection
  204.     {
  205.         return $this->fraisDeCourtages;
  206.     }
  207.     public function addFraisDeCourtage(FraisDeCourtage $fraisDeCourtage): self
  208.     {
  209.         if (!$this->fraisDeCourtages->contains($fraisDeCourtage)) {
  210.             $this->fraisDeCourtages[] = $fraisDeCourtage;
  211.             $fraisDeCourtage->setUnite($this);
  212.         }
  213.         return $this;
  214.     }
  215.     public function removeFraisDeCourtage(FraisDeCourtage $fraisDeCourtage): self
  216.     {
  217.         if ($this->fraisDeCourtages->contains($fraisDeCourtage)) {
  218.             $this->fraisDeCourtages->removeElement($fraisDeCourtage);
  219.             // set the owning side to null (unless already changed)
  220.             if ($fraisDeCourtage->getUnite() === $this) {
  221.                 $fraisDeCourtage->setUnite(null);
  222.             }
  223.         }
  224.         return $this;
  225.     }
  226.     /**
  227.      * @return Collection|AppelDeMarge[]
  228.      */
  229.     public function getAppelDeMarges(): Collection
  230.     {
  231.         return $this->appelDeMarges;
  232.     }
  233.     public function addAppelDeMarge(AppelDeMarge $appelDeMarge): self
  234.     {
  235.         if (!$this->appelDeMarges->contains($appelDeMarge)) {
  236.             $this->appelDeMarges[] = $appelDeMarge;
  237.             $appelDeMarge->setUnite($this);
  238.         }
  239.         return $this;
  240.     }
  241.     public function removeAppelDeMarge(AppelDeMarge $appelDeMarge): self
  242.     {
  243.         if ($this->appelDeMarges->contains($appelDeMarge)) {
  244.             $this->appelDeMarges->removeElement($appelDeMarge);
  245.             // set the owning side to null (unless already changed)
  246.             if ($appelDeMarge->getUnite() === $this) {
  247.                 $appelDeMarge->setUnite(null);
  248.             }
  249.         }
  250.         return $this;
  251.     }
  252.     /**
  253.      * @return Collection|SousJacent[]
  254.      */
  255.     public function getQtMinUnite(): Collection
  256.     {
  257.         return $this->qt_min_unite;
  258.     }
  259.     public function addQtMinUnite(SousJacent $qtMinUnite): self
  260.     {
  261.         if (!$this->qt_min_unite->contains($qtMinUnite)) {
  262.             $this->qt_min_unite[] = $qtMinUnite;
  263.             $qtMinUnite->setQtMinUnite($this);
  264.         }
  265.         return $this;
  266.     }
  267.     public function removeQtMinUnite(SousJacent $qtMinUnite): self
  268.     {
  269.         if ($this->qt_min_unite->contains($qtMinUnite)) {
  270.             $this->qt_min_unite->removeElement($qtMinUnite);
  271.             // set the owning side to null (unless already changed)
  272.             if ($qtMinUnite->getQtMinUnite() === $this) {
  273.                 $qtMinUnite->setQtMinUnite(null);
  274.             }
  275.         }
  276.         return $this;
  277.     }
  278.     /**
  279.      * @return Collection|SousJacent[]
  280.      */
  281.     public function getUnite3(): Collection
  282.     {
  283.         return $this->unite3;
  284.     }
  285.     public function addUnite3(SousJacent $unite3): self
  286.     {
  287.         if (!$this->unite3->contains($unite3)) {
  288.             $this->unite3[] = $unite3;
  289.             $unite3->setUnite3($this);
  290.         }
  291.         return $this;
  292.     }
  293.     public function removeUnite3(SousJacent $unite3): self
  294.     {
  295.         if ($this->unite3->contains($unite3)) {
  296.             $this->unite3->removeElement($unite3);
  297.             // set the owning side to null (unless already changed)
  298.             if ($unite3->getUnite3() === $this) {
  299.                 $unite3->setUnite3(null);
  300.             }
  301.         }
  302.         return $this;
  303.     }
  304.     /**
  305.      * @return Collection|LetterOfIntentToPurchase[]
  306.      */
  307.     public function getLetterOfIntentToPurchases(): Collection
  308.     {
  309.         return $this->letterOfIntentToPurchases;
  310.     }
  311.     public function addLetterOfIntentToPurchase(LetterOfIntentToPurchase $letterOfIntentToPurchase): self
  312.     {
  313.         if (!$this->letterOfIntentToPurchases->contains($letterOfIntentToPurchase)) {
  314.             $this->letterOfIntentToPurchases[] = $letterOfIntentToPurchase;
  315.             $letterOfIntentToPurchase->setQtUnite($this);
  316.         }
  317.         return $this;
  318.     }
  319.     public function removeLetterOfIntentToPurchase(LetterOfIntentToPurchase $letterOfIntentToPurchase): self
  320.     {
  321.         if ($this->letterOfIntentToPurchases->contains($letterOfIntentToPurchase)) {
  322.             $this->letterOfIntentToPurchases->removeElement($letterOfIntentToPurchase);
  323.             // set the owning side to null (unless already changed)
  324.             if ($letterOfIntentToPurchase->getQtUnite() === $this) {
  325.                 $letterOfIntentToPurchase->setQtUnite(null);
  326.             }
  327.         }
  328.         return $this;
  329.     }
  330.     public function getDescription(): ?string
  331.     {
  332.         return $this->description;
  333.     }
  334.     public function setDescription(?string $description): self
  335.     {
  336.         $this->description $description;
  337.         return $this;
  338.     }
  339.     /**
  340.      * @return Collection|Transaction[]
  341.      */
  342.     public function getTransactionsUnite(): Collection
  343.     {
  344.         return $this->transactions_unite;
  345.     }
  346.     public function addTransactionsUnite(Transaction $transactionsUnite): self
  347.     {
  348.         if (!$this->transactions_unite->contains($transactionsUnite)) {
  349.             $this->transactions_unite[] = $transactionsUnite;
  350.             $transactionsUnite->setUnitePaa($this);
  351.         }
  352.         return $this;
  353.     }
  354.     public function removeTransactionsUnite(Transaction $transactionsUnite): self
  355.     {
  356.         if ($this->transactions_unite->contains($transactionsUnite)) {
  357.             $this->transactions_unite->removeElement($transactionsUnite);
  358.             // set the owning side to null (unless already changed)
  359.             if ($transactionsUnite->getUnitePaa() === $this) {
  360.                 $transactionsUnite->setUnitePaa(null);
  361.             }
  362.         }
  363.         return $this;
  364.     }
  365.     /**
  366.      * @return Collection|Quotation[]
  367.      */
  368.     public function getQuotations(): Collection
  369.     {
  370.         return $this->quotations;
  371.     }
  372.     public function addQuotation(Quotation $quotation): self
  373.     {
  374.         if (!$this->quotations->contains($quotation)) {
  375.             $this->quotations[] = $quotation;
  376.             $quotation->setUnite($this);
  377.         }
  378.         return $this;
  379.     }
  380.     public function removeQuotation(Quotation $quotation): self
  381.     {
  382.         if ($this->quotations->contains($quotation)) {
  383.             $this->quotations->removeElement($quotation);
  384.             // set the owning side to null (unless already changed)
  385.             if ($quotation->getUnite() === $this) {
  386.                 $quotation->setUnite(null);
  387.             }
  388.         }
  389.         return $this;
  390.     }
  391. }