src/Entity/Sejourroom.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SejourroomRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=SejourroomRepository::class)
  9.  */
  10. class Sejourroom
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=Sejour::class, inversedBy="sejourrooms", cascade={"persist"})
  20.      * @ORM\JoinColumn(nullable=false)
  21.      */
  22.     private $sejour;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity=Chambre::class, inversedBy="sejourrooms")
  25.      * @ORM\JoinColumn(nullable=false)
  26.      */
  27.     private $chambre;
  28.     /**
  29.      * @ORM\Column(type="boolean", nullable=true)
  30.      */
  31.     private $etat;
  32.     /**
  33.      * @ORM\Column(type="integer", nullable=true)
  34.      */
  35.     private $adulte;
  36.     /**
  37.      * @ORM\Column(type="integer", nullable=true)
  38.      */
  39.     private $enfant;
  40.     /**
  41.      * @ORM\Column(type="integer", nullable=true)
  42.      */
  43.     private $bebe;
  44.     /**
  45.      * @ORM\Column(type="boolean", nullable=true)
  46.      */
  47.     private $personne;
  48.     /**
  49.      * @ORM\OneToMany(targetEntity=Sejourpriceroom::class, mappedBy="sejourroom", orphanRemoval=true)
  50.      */
  51.     private $sejourpricerooms;
  52.     public function __construct()
  53.     {
  54.         $this->sejourpricerooms = new ArrayCollection();
  55.     }
  56.     public function getId(): ?int
  57.     {
  58.         return $this->id;
  59.     }
  60.     public function getSejour(): ?Sejour
  61.     {
  62.         return $this->sejour;
  63.     }
  64.     public function setSejour(?Sejour $sejour): self
  65.     {
  66.         $this->sejour $sejour;
  67.         return $this;
  68.     }
  69.     public function getChambre(): ?Chambre
  70.     {
  71.         return $this->chambre;
  72.     }
  73.     public function setChambre(?Chambre $chambre): self
  74.     {
  75.         $this->chambre $chambre;
  76.         return $this;
  77.     }
  78.     public function isEtat(): ?bool
  79.     {
  80.         return $this->etat;
  81.     }
  82.     public function setEtat(?bool $etat): self
  83.     {
  84.         $this->etat $etat;
  85.         return $this;
  86.     }
  87.     public function getAdulte(): ?int
  88.     {
  89.         return $this->adulte;
  90.     }
  91.     public function setAdulte(?int $adulte): self
  92.     {
  93.         $this->adulte $adulte;
  94.         return $this;
  95.     }
  96.     public function getEnfant(): ?int
  97.     {
  98.         return $this->enfant;
  99.     }
  100.     public function setEnfant(?int $enfant): self
  101.     {
  102.         $this->enfant $enfant;
  103.         return $this;
  104.     }
  105.     public function getBebe(): ?int
  106.     {
  107.         return $this->bebe;
  108.     }
  109.     public function setBebe(?int $bebe): self
  110.     {
  111.         $this->bebe $bebe;
  112.         return $this;
  113.     }
  114.     public function isPersonne(): ?bool
  115.     {
  116.         return $this->personne;
  117.     }
  118.     public function setPersonne(?bool $personne): self
  119.     {
  120.         $this->personne $personne;
  121.         return $this;
  122.     }
  123.     /**
  124.      * @return Collection<int, Sejourpriceroom>
  125.      */
  126.     public function getSejourpricerooms(): Collection
  127.     {
  128.         return $this->sejourpricerooms;
  129.     }
  130.     public function addSejourpriceroom(Sejourpriceroom $sejourpriceroom): self
  131.     {
  132.         if (!$this->sejourpricerooms->contains($sejourpriceroom)) {
  133.             $this->sejourpricerooms[] = $sejourpriceroom;
  134.             $sejourpriceroom->setSejourroom($this);
  135.         }
  136.         return $this;
  137.     }
  138.     public function removeSejourpriceroom(Sejourpriceroom $sejourpriceroom): self
  139.     {
  140.         if ($this->sejourpricerooms->removeElement($sejourpriceroom)) {
  141.             // set the owning side to null (unless already changed)
  142.             if ($sejourpriceroom->getSejourroom() === $this) {
  143.                 $sejourpriceroom->setSejourroom(null);
  144.             }
  145.         }
  146.         return $this;
  147.     }
  148. }