src/Entity/Souscroisiereroom.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SouscroisiereroomRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=SouscroisiereroomRepository::class)
  9.  */
  10. class Souscroisiereroom
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=Souscroisiere::class, inversedBy="souscroisiererooms", cascade={"persist"})
  20.      */
  21.     private $souscroisiere;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=Cabine::class, inversedBy="souscroisiererooms", cascade={"persist"})
  24.      */
  25.     private $chambre;
  26.     /**
  27.      * @ORM\Column(type="boolean", nullable=true)
  28.      */
  29.     private $etat;
  30.     /**
  31.      * @ORM\OneToMany(targetEntity=Souscroisierepriceroom::class, mappedBy="souscroisiereroom")
  32.      */
  33.     private $souscroisierepricerooms;
  34.     /**
  35.      * @ORM\Column(type="integer", nullable=true)
  36.      */
  37.     private $adulte;
  38.     /**
  39.      * @ORM\Column(type="integer", nullable=true)
  40.      */
  41.     private $enfant;
  42.     public function __construct()
  43.     {
  44.         $this->souscroisierepricerooms = new ArrayCollection();
  45.     }
  46.     public function getId(): ?int
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function getSouscroisiere(): ?Souscroisiere
  51.     {
  52.         return $this->souscroisiere;
  53.     }
  54.     public function setSouscroisiere(?Souscroisiere $souscroisiere): self
  55.     {
  56.         $this->souscroisiere $souscroisiere;
  57.         return $this;
  58.     }
  59.     public function getChambre(): ?Cabine
  60.     {
  61.         return $this->chambre;
  62.     }
  63.     public function setChambre(?Cabine $chambre): self
  64.     {
  65.         $this->chambre $chambre;
  66.         return $this;
  67.     }
  68.     public function isEtat(): ?bool
  69.     {
  70.         return $this->etat;
  71.     }
  72.     public function setEtat(?bool $etat): self
  73.     {
  74.         $this->etat $etat;
  75.         return $this;
  76.     }
  77.     /**
  78.      * @return Collection<int, Souscroisierepriceroom>
  79.      */
  80.     public function getSouscroisierepricerooms(): Collection
  81.     {
  82.         return $this->souscroisierepricerooms;
  83.     }
  84.     public function addSouscroisierepriceroom(Souscroisierepriceroom $souscroisierepriceroom): self
  85.     {
  86.         if (!$this->souscroisierepricerooms->contains($souscroisierepriceroom)) {
  87.             $this->souscroisierepricerooms[] = $souscroisierepriceroom;
  88.             $souscroisierepriceroom->setSouscroisiereroom($this);
  89.         }
  90.         return $this;
  91.     }
  92.     public function removeSouscroisierepriceroom(Souscroisierepriceroom $souscroisierepriceroom): self
  93.     {
  94.         if ($this->souscroisierepricerooms->removeElement($souscroisierepriceroom)) {
  95.             // set the owning side to null (unless already changed)
  96.             if ($souscroisierepriceroom->getSouscroisiereroom() === $this) {
  97.                 $souscroisierepriceroom->setSouscroisiereroom(null);
  98.             }
  99.         }
  100.         return $this;
  101.     }
  102.     public function getAdulte(): ?int
  103.     {
  104.         return $this->adulte;
  105.     }
  106.     public function setAdulte(?int $adulte): self
  107.     {
  108.         $this->adulte $adulte;
  109.         return $this;
  110.     }
  111.     public function getEnfant(): ?int
  112.     {
  113.         return $this->enfant;
  114.     }
  115.     public function setEnfant(?int $enfant): self
  116.     {
  117.         $this->enfant $enfant;
  118.         return $this;
  119.     }
  120. }