<?php
namespace App\Entity;
use App\Repository\SouscroisiereroomRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=SouscroisiereroomRepository::class)
*/
class Souscroisiereroom
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Souscroisiere::class, inversedBy="souscroisiererooms", cascade={"persist"})
*/
private $souscroisiere;
/**
* @ORM\ManyToOne(targetEntity=Cabine::class, inversedBy="souscroisiererooms", cascade={"persist"})
*/
private $chambre;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $etat;
/**
* @ORM\OneToMany(targetEntity=Souscroisierepriceroom::class, mappedBy="souscroisiereroom")
*/
private $souscroisierepricerooms;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $adulte;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $enfant;
public function __construct()
{
$this->souscroisierepricerooms = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getSouscroisiere(): ?Souscroisiere
{
return $this->souscroisiere;
}
public function setSouscroisiere(?Souscroisiere $souscroisiere): self
{
$this->souscroisiere = $souscroisiere;
return $this;
}
public function getChambre(): ?Cabine
{
return $this->chambre;
}
public function setChambre(?Cabine $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;
}
/**
* @return Collection<int, Souscroisierepriceroom>
*/
public function getSouscroisierepricerooms(): Collection
{
return $this->souscroisierepricerooms;
}
public function addSouscroisierepriceroom(Souscroisierepriceroom $souscroisierepriceroom): self
{
if (!$this->souscroisierepricerooms->contains($souscroisierepriceroom)) {
$this->souscroisierepricerooms[] = $souscroisierepriceroom;
$souscroisierepriceroom->setSouscroisiereroom($this);
}
return $this;
}
public function removeSouscroisierepriceroom(Souscroisierepriceroom $souscroisierepriceroom): self
{
if ($this->souscroisierepricerooms->removeElement($souscroisierepriceroom)) {
// set the owning side to null (unless already changed)
if ($souscroisierepriceroom->getSouscroisiereroom() === $this) {
$souscroisierepriceroom->setSouscroisiereroom(null);
}
}
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;
}
}