<?php
namespace App\Entity;
use App\Repository\SejourroomRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=SejourroomRepository::class)
*/
class Sejourroom
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Sejour::class, inversedBy="sejourrooms", cascade={"persist"})
* @ORM\JoinColumn(nullable=false)
*/
private $sejour;
/**
* @ORM\ManyToOne(targetEntity=Chambre::class, inversedBy="sejourrooms")
* @ORM\JoinColumn(nullable=false)
*/
private $chambre;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $etat;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $adulte;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $enfant;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $bebe;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $personne;
/**
* @ORM\OneToMany(targetEntity=Sejourpriceroom::class, mappedBy="sejourroom", orphanRemoval=true)
*/
private $sejourpricerooms;
public function __construct()
{
$this->sejourpricerooms = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getSejour(): ?Sejour
{
return $this->sejour;
}
public function setSejour(?Sejour $sejour): self
{
$this->sejour = $sejour;
return $this;
}
public function getChambre(): ?Chambre
{
return $this->chambre;
}
public function setChambre(?Chambre $chambre): self
{
$this->chambre = $chambre;
return $this;
}
public function isEtat(): ?bool
{
return $this->etat;
}
public function setEtat(?bool $etat): self
{
$this->etat = $etat;
return $this;
}
public function getAdulte(): ?int
{
return $this->adulte;
}
public function setAdulte(?int $adulte): self
{
$this->adulte = $adulte;
return $this;
}
public function getEnfant(): ?int
{
return $this->enfant;
}
public function setEnfant(?int $enfant): self
{
$this->enfant = $enfant;
return $this;
}
public function getBebe(): ?int
{
return $this->bebe;
}
public function setBebe(?int $bebe): self
{
$this->bebe = $bebe;
return $this;
}
public function isPersonne(): ?bool
{
return $this->personne;
}
public function setPersonne(?bool $personne): self
{
$this->personne = $personne;
return $this;
}
/**
* @return Collection<int, Sejourpriceroom>
*/
public function getSejourpricerooms(): Collection
{
return $this->sejourpricerooms;
}
public function addSejourpriceroom(Sejourpriceroom $sejourpriceroom): self
{
if (!$this->sejourpricerooms->contains($sejourpriceroom)) {
$this->sejourpricerooms[] = $sejourpriceroom;
$sejourpriceroom->setSejourroom($this);
}
return $this;
}
public function removeSejourpriceroom(Sejourpriceroom $sejourpriceroom): self
{
if ($this->sejourpricerooms->removeElement($sejourpriceroom)) {
// set the owning side to null (unless already changed)
if ($sejourpriceroom->getSejourroom() === $this) {
$sejourpriceroom->setSejourroom(null);
}
}
return $this;
}
}