<?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\UniteRepository")
*/
class Unite
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $nom;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\SousJacent", mappedBy="px_unite")
*/
private $sousJacents;
/**
* @ORM\OneToMany(targetEntity="App\Entity\AdminDonneurOrdre", mappedBy="unite")
*/
private $adminDonneurOrdres;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Transaction", mappedBy="total_unite")
*/
private $transactions;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Operation", mappedBy="unite")
*/
private $operations;
/**
* @ORM\OneToMany(targetEntity="App\Entity\FraisDeCourtage", mappedBy="unite")
*/
private $fraisDeCourtages;
/**
* @ORM\OneToMany(targetEntity="App\Entity\AppelDeMarge", mappedBy="unite")
*/
private $appelDeMarges;
/**
* @ORM\OneToMany(targetEntity="App\Entity\SousJacent", mappedBy="qt_min_unite")
*/
private $qt_min_unite;
/**
* @ORM\OneToMany(targetEntity="App\Entity\SousJacent", mappedBy="unite3")
*/
private $unite3;
/**
* @ORM\OneToMany(targetEntity="App\Entity\LetterOfIntentToPurchase", mappedBy="qt_unite")
*/
private $letterOfIntentToPurchases;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $description;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Transaction", mappedBy="unite_paa")
*/
private $transactions_unite;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Quotation", mappedBy="unite")
*/
private $quotations;
public function __construct()
{
$this->sousJacents = new ArrayCollection();
$this->adminDonneurOrdres = new ArrayCollection();
$this->transactions = new ArrayCollection();
$this->operations = new ArrayCollection();
$this->fraisDeCourtages = new ArrayCollection();
$this->appelDeMarges = new ArrayCollection();
$this->qt_min_unite = new ArrayCollection();
$this->unite3 = new ArrayCollection();
$this->letterOfIntentToPurchases = new ArrayCollection();
$this->transactions_unite = new ArrayCollection();
$this->quotations = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(string $nom): self
{
$this->nom = $nom;
return $this;
}
public function __toString(){
return $this->nom;
}
/**
* @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->addPxUnite($this);
}
return $this;
}
public function removeSousJacent(SousJacent $sousJacent): self
{
if ($this->sousJacents->contains($sousJacent)) {
$this->sousJacents->removeElement($sousJacent);
$sousJacent->removePxUnite($this);
}
return $this;
}
/**
* @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->setUnite($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->getUnite() === $this) {
$adminDonneurOrdre->setUnite(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->setTotalUnite($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->getTotalUnite() === $this) {
$transaction->setTotalUnite(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->setUnite($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->getUnite() === $this) {
$operation->setUnite(null);
}
}
return $this;
}
/**
* @return Collection|FraisDeCourtage[]
*/
public function getFraisDeCourtages(): Collection
{
return $this->fraisDeCourtages;
}
public function addFraisDeCourtage(FraisDeCourtage $fraisDeCourtage): self
{
if (!$this->fraisDeCourtages->contains($fraisDeCourtage)) {
$this->fraisDeCourtages[] = $fraisDeCourtage;
$fraisDeCourtage->setUnite($this);
}
return $this;
}
public function removeFraisDeCourtage(FraisDeCourtage $fraisDeCourtage): self
{
if ($this->fraisDeCourtages->contains($fraisDeCourtage)) {
$this->fraisDeCourtages->removeElement($fraisDeCourtage);
// set the owning side to null (unless already changed)
if ($fraisDeCourtage->getUnite() === $this) {
$fraisDeCourtage->setUnite(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->setUnite($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->getUnite() === $this) {
$appelDeMarge->setUnite(null);
}
}
return $this;
}
/**
* @return Collection|SousJacent[]
*/
public function getQtMinUnite(): Collection
{
return $this->qt_min_unite;
}
public function addQtMinUnite(SousJacent $qtMinUnite): self
{
if (!$this->qt_min_unite->contains($qtMinUnite)) {
$this->qt_min_unite[] = $qtMinUnite;
$qtMinUnite->setQtMinUnite($this);
}
return $this;
}
public function removeQtMinUnite(SousJacent $qtMinUnite): self
{
if ($this->qt_min_unite->contains($qtMinUnite)) {
$this->qt_min_unite->removeElement($qtMinUnite);
// set the owning side to null (unless already changed)
if ($qtMinUnite->getQtMinUnite() === $this) {
$qtMinUnite->setQtMinUnite(null);
}
}
return $this;
}
/**
* @return Collection|SousJacent[]
*/
public function getUnite3(): Collection
{
return $this->unite3;
}
public function addUnite3(SousJacent $unite3): self
{
if (!$this->unite3->contains($unite3)) {
$this->unite3[] = $unite3;
$unite3->setUnite3($this);
}
return $this;
}
public function removeUnite3(SousJacent $unite3): self
{
if ($this->unite3->contains($unite3)) {
$this->unite3->removeElement($unite3);
// set the owning side to null (unless already changed)
if ($unite3->getUnite3() === $this) {
$unite3->setUnite3(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->setQtUnite($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->getQtUnite() === $this) {
$letterOfIntentToPurchase->setQtUnite(null);
}
}
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
/**
* @return Collection|Transaction[]
*/
public function getTransactionsUnite(): Collection
{
return $this->transactions_unite;
}
public function addTransactionsUnite(Transaction $transactionsUnite): self
{
if (!$this->transactions_unite->contains($transactionsUnite)) {
$this->transactions_unite[] = $transactionsUnite;
$transactionsUnite->setUnitePaa($this);
}
return $this;
}
public function removeTransactionsUnite(Transaction $transactionsUnite): self
{
if ($this->transactions_unite->contains($transactionsUnite)) {
$this->transactions_unite->removeElement($transactionsUnite);
// set the owning side to null (unless already changed)
if ($transactionsUnite->getUnitePaa() === $this) {
$transactionsUnite->setUnitePaa(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->setUnite($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->getUnite() === $this) {
$quotation->setUnite(null);
}
}
return $this;
}
}