src/Entity/Niveau.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\NiveauRepository")
  8.  */
  9. class Niveau
  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 $niveau;
  21.     /**
  22.      * @ORM\Column(type="datetime")
  23.      */
  24.     private $createdAt;
  25.     /**
  26.      * @ORM\OneToMany(targetEntity="App\Entity\AdminDonneurOrdre", mappedBy="niveau")
  27.      */
  28.     private $adminDonneurOrdres;
  29.     /**
  30.      * @ORM\OneToMany(targetEntity="App\Entity\SousJacent", mappedBy="niveau")
  31.      */
  32.     private $sousJacents;
  33.     /**
  34.      * @ORM\OneToMany(targetEntity="App\Entity\LeveeDeFond", mappedBy="niveau")
  35.      */
  36.     private $leveeDeFonds;
  37.     /**
  38.      * @ORM\OneToMany(targetEntity="App\Entity\TraitementDsDemdDachat", mappedBy="niveau")
  39.      */
  40.     private $traitementDsDemdDachats;
  41.     /**
  42.      * @ORM\OneToMany(targetEntity="App\Entity\LetterOfIntentToPurchase", mappedBy="niveau")
  43.      */
  44.     private $letterOfIntentToPurchases;
  45.     /**
  46.      * @ORM\Column(type="text", nullable=true)
  47.      */
  48.     private $description;
  49.     /**
  50.      * @ORM\OneToMany(targetEntity="App\Entity\Transaction", mappedBy="niveau")
  51.      */
  52.     private $transactions;
  53.     /**
  54.      * @ORM\OneToMany(targetEntity="App\Entity\Prospect", mappedBy="niveau")
  55.      */
  56.     private $prospects;
  57.     /**
  58.      * @ORM\OneToMany(targetEntity="App\Entity\RequeteDeFinancement", mappedBy="niveau")
  59.      */
  60.     private $requeteDeFinancements;
  61.     public function __construct()
  62.     {
  63.         $this->createdAt = new \DateTime('now');
  64.         $this->adminDonneurOrdres = new ArrayCollection();
  65.         $this->sousJacents = new ArrayCollection();
  66.         $this->leveeDeFonds = new ArrayCollection();
  67.         $this->traitementDsDemdDachats = new ArrayCollection();
  68.         $this->letterOfIntentToPurchases = new ArrayCollection();
  69.         $this->transactions = new ArrayCollection();
  70.         $this->prospects = new ArrayCollection();
  71.         $this->requeteDeFinancements = new ArrayCollection();
  72.     }
  73.     public function getId(): ?int
  74.     {
  75.         return $this->id;
  76.     }
  77.     public function getNiveau(): ?string
  78.     {
  79.         return $this->niveau;
  80.     }
  81.     public function setNiveau(string $niveau): self
  82.     {
  83.         $this->niveau $niveau;
  84.         return $this;
  85.     }
  86.     public function getCreatedAt(): ?\DateTimeInterface
  87.     {
  88.         return $this->createdAt;
  89.     }
  90.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  91.     {
  92.         $this->createdAt $createdAt;
  93.         return $this;
  94.     }
  95.     /**
  96.      * @return Collection|AdminDonneurOrdre[]
  97.      */
  98.     public function getAdminDonneurOrdres(): Collection
  99.     {
  100.         return $this->adminDonneurOrdres;
  101.     }
  102.     public function addAdminDonneurOrdre(AdminDonneurOrdre $adminDonneurOrdre): self
  103.     {
  104.         if (!$this->adminDonneurOrdres->contains($adminDonneurOrdre)) {
  105.             $this->adminDonneurOrdres[] = $adminDonneurOrdre;
  106.             $adminDonneurOrdre->setNiveau($this);
  107.         }
  108.         return $this;
  109.     }
  110.     public function removeAdminDonneurOrdre(AdminDonneurOrdre $adminDonneurOrdre): self
  111.     {
  112.         if ($this->adminDonneurOrdres->contains($adminDonneurOrdre)) {
  113.             $this->adminDonneurOrdres->removeElement($adminDonneurOrdre);
  114.             // set the owning side to null (unless already changed)
  115.             if ($adminDonneurOrdre->getNiveau() === $this) {
  116.                 $adminDonneurOrdre->setNiveau(null);
  117.             }
  118.         }
  119.         return $this;
  120.     }
  121.     /**
  122.      * @return Collection |RequeteDeFinancement[]
  123.      */
  124.     public function getRequeteDeFinancements(): Collection
  125.     {
  126.         return $this->requeteDeFinancements;
  127.     }
  128.     public function addRequeteDeFinancement(RequeteDeFinancement $requeteDeFinancement): self
  129.     {
  130.         if (!$this->requeteDeFinancements->contains($requeteDeFinancement)) {
  131.             $this->requeteDeFinancements[] = $requeteDeFinancement;
  132.             $requeteDeFinancement->setNiveau($this);
  133.         }
  134.         return $this;
  135.     }
  136.     public function removeRequeteDeFinancement(RequeteDeFinancement $requeteDeFinancement): self
  137.     {
  138.         if ($this->requeteDeFinancements->contains($requeteDeFinancement)) {
  139.             $this->requeteDeFinancements->removeElement($requeteDeFinancement);
  140.             // set the owning side to null (unless already changed)
  141.             if ($requeteDeFinancement->getNiveau() === $this) {
  142.                 $requeteDeFinancement->setNiveau(null);
  143.             }
  144.         }
  145.         return $this;
  146.     }
  147.     public function __toString(): string
  148.     {
  149.         return $this->niveau;
  150.     }
  151.     /**
  152.      * @return Collection|SousJacent[]
  153.      */
  154.     public function getSousJacents(): Collection
  155.     {
  156.         return $this->sousJacents;
  157.     }
  158.     public function addSousJacent(SousJacent $sousJacent): self
  159.     {
  160.         if (!$this->sousJacents->contains($sousJacent)) {
  161.             $this->sousJacents[] = $sousJacent;
  162.             $sousJacent->setNiveau($this);
  163.         }
  164.         return $this;
  165.     }
  166.     public function removeSousJacent(SousJacent $sousJacent): self
  167.     {
  168.         if ($this->sousJacents->contains($sousJacent)) {
  169.             $this->sousJacents->removeElement($sousJacent);
  170.             // set the owning side to null (unless already changed)
  171.             if ($sousJacent->getNiveau() === $this) {
  172.                 $sousJacent->setNiveau(null);
  173.             }
  174.         }
  175.         return $this;
  176.     }
  177.     /**
  178.      * @return Collection|LeveeDeFond[]
  179.      */
  180.     public function getLeveeDeFonds(): Collection
  181.     {
  182.         return $this->leveeDeFonds;
  183.     }
  184.     public function addLeveeDeFond(LeveeDeFond $leveeDeFond): self
  185.     {
  186.         if (!$this->leveeDeFonds->contains($leveeDeFond)) {
  187.             $this->leveeDeFonds[] = $leveeDeFond;
  188.             $leveeDeFond->setNiveau($this);
  189.         }
  190.         return $this;
  191.     }
  192.     public function removeLeveeDeFond(LeveeDeFond $leveeDeFond): self
  193.     {
  194.         if ($this->leveeDeFonds->contains($leveeDeFond)) {
  195.             $this->leveeDeFonds->removeElement($leveeDeFond);
  196.             // set the owning side to null (unless already changed)
  197.             if ($leveeDeFond->getNiveau() === $this) {
  198.                 $leveeDeFond->setNiveau(null);
  199.             }
  200.         }
  201.         return $this;
  202.     }
  203.     /**
  204.      * @return Collection|TraitementDsDemdDachat[]
  205.      */
  206.     public function getTraitementDsDemdDachats(): Collection
  207.     {
  208.         return $this->traitementDsDemdDachats;
  209.     }
  210.     public function addTraitementDsDemdDachat(TraitementDsDemdDachat $traitementDsDemdDachat): self
  211.     {
  212.         if (!$this->traitementDsDemdDachats->contains($traitementDsDemdDachat)) {
  213.             $this->traitementDsDemdDachats[] = $traitementDsDemdDachat;
  214.             $traitementDsDemdDachat->setNiveau($this);
  215.         }
  216.         return $this;
  217.     }
  218.     public function removeTraitementDsDemdDachat(TraitementDsDemdDachat $traitementDsDemdDachat): self
  219.     {
  220.         if ($this->traitementDsDemdDachats->contains($traitementDsDemdDachat)) {
  221.             $this->traitementDsDemdDachats->removeElement($traitementDsDemdDachat);
  222.             // set the owning side to null (unless already changed)
  223.             if ($traitementDsDemdDachat->getNiveau() === $this) {
  224.                 $traitementDsDemdDachat->setNiveau(null);
  225.             }
  226.         }
  227.         return $this;
  228.     }
  229.     /**
  230.      * @return Collection|LetterOfIntentToPurchase[]
  231.      */
  232.     public function getLetterOfIntentToPurchases(): Collection
  233.     {
  234.         return $this->letterOfIntentToPurchases;
  235.     }
  236.     public function addLetterOfIntentToPurchase(LetterOfIntentToPurchase $letterOfIntentToPurchase): self
  237.     {
  238.         if (!$this->letterOfIntentToPurchases->contains($letterOfIntentToPurchase)) {
  239.             $this->letterOfIntentToPurchases[] = $letterOfIntentToPurchase;
  240.             $letterOfIntentToPurchase->setNiveau($this);
  241.         }
  242.         return $this;
  243.     }
  244.     public function removeLetterOfIntentToPurchase(LetterOfIntentToPurchase $letterOfIntentToPurchase): self
  245.     {
  246.         if ($this->letterOfIntentToPurchases->contains($letterOfIntentToPurchase)) {
  247.             $this->letterOfIntentToPurchases->removeElement($letterOfIntentToPurchase);
  248.             // set the owning side to null (unless already changed)
  249.             if ($letterOfIntentToPurchase->getNiveau() === $this) {
  250.                 $letterOfIntentToPurchase->setNiveau(null);
  251.             }
  252.         }
  253.         return $this;
  254.     }
  255.     public function getDescription(): ?string
  256.     {
  257.         return $this->description;
  258.     }
  259.     public function setDescription(?string $description): self
  260.     {
  261.         $this->description $description;
  262.         return $this;
  263.     }
  264.     /**
  265.      * @return Collection|Transaction[]
  266.      */
  267.     public function getTransactions(): Collection
  268.     {
  269.         return $this->transactions;
  270.     }
  271.     public function addTransaction(Transaction $transaction): self
  272.     {
  273.         if (!$this->transactions->contains($transaction)) {
  274.             $this->transactions[] = $transaction;
  275.             $transaction->setNiveau($this);
  276.         }
  277.         return $this;
  278.     }
  279.     public function removeTransaction(Transaction $transaction): self
  280.     {
  281.         if ($this->transactions->contains($transaction)) {
  282.             $this->transactions->removeElement($transaction);
  283.             // set the owning side to null (unless already changed)
  284.             if ($transaction->getNiveau() === $this) {
  285.                 $transaction->setNiveau(null);
  286.             }
  287.         }
  288.         return $this;
  289.     }
  290.     /**
  291.      * @return Collection|Prospect[]
  292.      */
  293.     public function getProspects(): Collection
  294.     {
  295.         return $this->prospects;
  296.     }
  297.     public function addProspect(Prospect $prospect): self
  298.     {
  299.         if (!$this->prospects->contains($prospect)) {
  300.             $this->prospects[] = $prospect;
  301.             $prospect->setNiveau($this);
  302.         }
  303.         return $this;
  304.     }
  305.     public function removeProspect(Prospect $prospect): self
  306.     {
  307.         if ($this->prospects->contains($prospect)) {
  308.             $this->prospects->removeElement($prospect);
  309.             // set the owning side to null (unless already changed)
  310.             if ($prospect->getNiveau() === $this) {
  311.                 $prospect->setNiveau(null);
  312.             }
  313.         }
  314.         return $this;
  315.     }
  316. }