<?php
namespace App\Entity;
use App\Entity\ReseauSociaux\Publication;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\ProductRepository;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=ProductRepository::class)
*/
class Product
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
* @Groups({"product:read", "publication:read", "post:read"})
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
* @Groups("post:read","product:read","publication:read")
*/
private $name;
/**
* @ORM\Column(type="text")
*/
private $text;
/**
* @ORM\Column(type="float", nullable=true)
* @Groups({"product:read"})
*/
private $price;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $quantity;
/**
* @ORM\OneToMany(targetEntity=Photos::class, mappedBy="product", cascade={"persist", "remove"})
* @Assert\NotBlank(message="Veuillez ajouter au moins une photo au produit")
* @Groups("post:read","product:read")
*/
private $photos;
/**
* @ORM\ManyToOne(targetEntity=Company::class, inversedBy="products")
*/
private $company;
/**
* @ORM\Column(type="string", length=255)
* @Groups("publication:read","post:read")
*/
private $productSlug;
/**
* @ORM\Column(type="integer", nullable=true, options={"default" : 50})
*/
private $percentDeposit;
/**
* @ORM\Column(type="integer", nullable=true, options={"default" : 0})
*/
private $deadline;
/**
* @ORM\ManyToMany(targetEntity=Department::class, inversedBy="products")
*/
private $departments;
/**
* @ORM\Column(type="array", nullable=true)
*/
private $sizes = [];
/**
* @ORM\Column(type="array", nullable=true)
*/
private $colors = [];
/**
* @ORM\Column(type="array", nullable=true)
*/
private $sizeRing = [];
/**
* @ORM\OneToMany(targetEntity=CommandProduct::class, mappedBy="product")
*/
private $commandProducts;
/**
* @ORM\OneToMany(targetEntity=Avis::class, mappedBy="product")
*/
private $avis;
/**
* @ORM\ManyToOne(targetEntity=Pack::class, inversedBy="products")
*/
private $pack;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $nbGuest;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $youtubeVideo;
/**
* @ORM\Column(type="boolean")
*/
private $isActivated;
/**
* @ORM\Column(type="boolean")
*/
private $isDesactivatedByAdmin;
/**
* @ORM\Column(type="array", nullable=true)
*/
private $modeLivraison;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $fraisLivraison;
/**
* @ORM\OneToMany(targetEntity=ProductPercent::class, mappedBy="product")
*/
private $productPercents;
/**
* @ORM\OneToMany(targetEntity=ContactProduct::class, mappedBy="product")
*/
private $contactProducts;
/**
* @ORM\OneToMany(targetEntity=ProductOption::class, mappedBy="product", orphanRemoval=true, cascade={"persist", "remove"})
*/
private $productOptions;
/**
* @ORM\ManyToMany(targetEntity=SubCategory::class, inversedBy="products")
* @Groups("publication:read", "post:read")
*/
private $subCategories;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $weight;
/**
* @ORM\Column(type="array", nullable=true)
*/
private $transporteurs = [];
/**
* @ORM\Column(type="string", length=20, nullable=true)
*/
private $codePromo;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $codePromoEuro;
/**
* @ORM\OneToOne(targetEntity=ProductDescription::class, mappedBy="product", cascade={"persist", "remove"})
*/
private $productDescription;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $template;
/**
* @ORM\OneToMany(targetEntity=AnnonceCompany::class, mappedBy="products")
*/
private $annonceCompanies;
/**
* @ORM\ManyToOne(targetEntity=TypeLocation::class, inversedBy="products")
*/
private $typeLocation;
/**
* @ORM\ManyToOne(targetEntity=TypePrestation::class, inversedBy="products")
*/
private $typePrestation;
/**
* @ORM\OneToMany(targetEntity=Location::class, mappedBy="product", orphanRemoval=true)
*/
private $locations;
/**
* @ORM\OneToMany(targetEntity=Reservation::class, mappedBy="product", orphanRemoval=true)
*/
private $reservations;
/**
* @ORM\ManyToOne(targetEntity=Tva::class, inversedBy="products")
*/
private $tva;
/**
* @ORM\OneToMany(targetEntity=Caution::class, mappedBy="product")
*/
private $cautions;
/**
* @ORM\OneToMany(targetEntity=Participant::class, mappedBy="produit")
*/
private $participants;
/**
* @ORM\ManyToOne(targetEntity=TypeHebergement::class, cascade={"persist"})
*/
private $typeHebergements;
/**
* @ORM\OneToMany(targetEntity=Chambre::class, mappedBy="product", orphanRemoval=true, cascade={"persist"})
*/
private $chambres;
/**
* @ORM\ManyToMany(targetEntity=Caracteristic::class, mappedBy="product")
*/
private $caracteristics;
/**
* @ORM\ManyToMany(targetEntity=Equipment::class, mappedBy="product")
*/
private $equipment;
/**
* @ORM\ManyToMany(targetEntity=LangueHote::class, mappedBy="product")
*/
private $langueHotes;
/**
* @ORM\ManyToMany(targetEntity=TypeLocalisation::class, mappedBy="product")
*/
private $typeLocalisations;
/**
* @ORM\ManyToMany(targetEntity=Security::class, mappedBy="product")
*/
private $securities;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $taxeSejour;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $prixCaution;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $longitude;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $latitude;
/**
* @ORM\ManyToOne(targetEntity=ActivityType::class)
*/
private $typeActivity;
/**
* @ORM\OneToMany(targetEntity=ProductReduction::class, mappedBy="Product", orphanRemoval=true, cascade={"persist", "remove"})
*/
private $productReductions;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $springPrice;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $summerPrice;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $autumnPrice;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $winterPrice;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $weekEndPrice;
/**
* @ORM\OneToMany(targetEntity=ProgrammingDayPrice::class, mappedBy="product", orphanRemoval=true, cascade={"persist"})
*/
private $dayPrice;
/**
* @ORM\OneToMany(targetEntity=ProductAgenda::class, mappedBy="product", orphanRemoval=true, cascade={"persist"})
*/
private $productAgendas;
/**
* @ORM\OneToMany(targetEntity=ProductAutoReduction::class, mappedBy="Product", orphanRemoval=true, cascade={"persist"})
*/
private $productAutoReduction;
/**
* @ORM\OneToMany(targetEntity=Publication::class, mappedBy="product_company")
*/
private $publications;
/**
* @ORM\OneToMany(targetEntity=PendingLocation::class, mappedBy="product")
*/
private $pendingLocations;
/**
* @ORM\OneToMany(targetEntity=PendingReservation::class, mappedBy="product")
*/
private $pendingReservations;
/**
* @ORM\OneToMany(targetEntity=ProductPeriodPrice::class, mappedBy="product", orphanRemoval=true, cascade={"persist"})
*/
private $periodPrice;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $cityLocalisation;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private ?int $nbChambre = null;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $nightMin;
/**
* @ORM\OneToMany(targetEntity=TarifDegressif::class, mappedBy="Product", orphanRemoval=true, cascade={"persist", "remove"})
*/
private $tarifDegressifs;
/**
* @ORM\ManyToMany(targetEntity=EquipementsCuisine::class, mappedBy="product")
*/
private $equipementsCuisines;
/**
* @ORM\ManyToMany(targetEntity=SalleDeBain::class, mappedBy="product")
*/
private $salleDeBains;
/**
* @ORM\ManyToMany(targetEntity=AccessoiresDeChambre::class, mappedBy="product")
*/
private $accessoiresDeChambres;
/**
* @ORM\ManyToMany(targetEntity=MobilierExterieur::class, mappedBy="product")
*/
private $mobilierExterieurs;
/**
* @ORM\ManyToOne(targetEntity=CaracteristiqueVehicule::class, inversedBy="products", cascade={"persist"})
*/
private $caracteristiqueVehicule;
/**
* @ORM\OneToMany(targetEntity=Notification::class, mappedBy="product")
*/
private $notificationReservation;
/**
* @ORM\ManyToOne(targetEntity=Commune::class, inversedBy="products")
*/
private $commune;
public function __construct()
{
$this->photos = new ArrayCollection();
$this->departments = new ArrayCollection();
$this->commandProducts = new ArrayCollection();
$this->avis = new ArrayCollection();
$this->isActivated = true;
$this->isDesactivatedByAdmin = false;
$this->productPercents = new ArrayCollection();
$this->contactProducts = new ArrayCollection();
$this->productOptions = new ArrayCollection();
$this->subCategories = new ArrayCollection();
$this->annonceCompanies = new ArrayCollection();
$this->locations = new ArrayCollection();
$this->reservations = new ArrayCollection();
$this->cautions = new ArrayCollection();
$this->participants = new ArrayCollection();
$this->chambres = new ArrayCollection();
$this->caracteristics = new ArrayCollection();
$this->equipment = new ArrayCollection();
$this->langueHotes = new ArrayCollection();
$this->typeLocalisations = new ArrayCollection();
$this->securities = new ArrayCollection();
$this->productReductions = new ArrayCollection();
$this->dayPrice = new ArrayCollection();
$this->productAgendas = new ArrayCollection();
$this->productAutoReduction = new ArrayCollection();
$this->publications = new ArrayCollection();
$this->pendingLocations = new ArrayCollection();
$this->pendingReservations = new ArrayCollection();
$this->periodPrice = new ArrayCollection();
$this->tarifDegressifs = new ArrayCollection();
$this->equipementsCuisines = new ArrayCollection();
$this->salleDeBains = new ArrayCollection();
$this->accessoiresDeChambres = new ArrayCollection();
$this->mobilierExterieurs = new ArrayCollection();
$this->notificationReservation = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getPercentDeposit(): ?int
{
return $this->percentDeposit;
}
public function setPercentDeposit(?int $percentDeposit): self
{
$this->percentDeposit = $percentDeposit;
return $this;
}
public function getDeadline(): ?int
{
return $this->deadline;
}
public function setDeadline(?int $deadline): self
{
$this->deadline = $deadline;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
public function getText(): ?string
{
return $this->text;
}
public function setText(?string $text): self
{
$this->text = $text;
return $this;
}
public function getPrice(): ?float
{
return $this->price;
}
public function setPrice(float $price): self
{
$this->price = $price;
return $this;
}
public function getQuantity(): ?int
{
return $this->quantity;
}
public function setQuantity(?int $quantity): self
{
$this->quantity = $quantity;
return $this;
}
/**
* @return Collection|Photos[]
*/
public function getPhotos(): Collection
{
return $this->photos;
}
public function addPhoto(Photos $photo): self
{
if (!$this->photos->contains($photo)) {
$this->photos[] = $photo;
$photo->setProduct($this);
}
return $this;
}
public function removePhoto(Photos $photo): self
{
if ($this->photos->contains($photo)) {
$this->photos->removeElement($photo);
// set the owning side to null (unless already changed)
if ($photo->getProduct() === $this) {
$photo->setProduct(null);
}
}
return $this;
}
public function getCompany(): ?Company
{
return $this->company;
}
public function setCompany(?Company $company): self
{
$this->company = $company;
return $this;
}
/**
* @return mixed
*/
public function getProductSlug()
{
return $this->productSlug;
}
/**
* @param mixed $productSlug
*/
public function setProductSlug($productSlug): void
{
$this->productSlug = $productSlug;
}
/**
* @return Collection|Department[]
*/
public function getDepartments(): Collection
{
return $this->departments;
}
public function addDepartment(Department $department): self
{
if (!$this->departments->contains($department)) {
$this->departments[] = $department;
}
return $this;
}
public function removeDepartment(Department $department): self
{
if ($this->departments->contains($department)) {
$this->departments->removeElement($department);
}
return $this;
}
public function getSizes(): ?array
{
return $this->sizes;
}
public function setSizes(?array $sizes): self
{
$this->sizes = $sizes;
return $this;
}
/**
* @return Collection|CommandProduct[]
*/
public function getCommandProducts(): Collection
{
return $this->commandProducts;
}
public function addCommandProduct(CommandProduct $commandProduct): self
{
if (!$this->commandProducts->contains($commandProduct)) {
$this->commandProducts[] = $commandProduct;
$commandProduct->setProduct($this);
}
return $this;
}
public function removeCommandProduct(CommandProduct $commandProduct): self
{
if ($this->commandProducts->contains($commandProduct)) {
$this->commandProducts->removeElement($commandProduct);
// set the owning side to null (unless already changed)
if ($commandProduct->getProduct() === $this) {
$commandProduct->setProduct(null);
}
}
return $this;
}
/**
* @return Collection|Avis[]
*/
public function getAvis(): Collection
{
return $this->avis;
}
public function addAvi(Avis $avi): self
{
if (!$this->avis->contains($avi)) {
$this->avis[] = $avi;
$avi->setProduct($this);
}
return $this;
}
public function removeAvi(Avis $avi): self
{
if ($this->avis->contains($avi)) {
$this->avis->removeElement($avi);
// set the owning side to null (unless already changed)
if ($avi->getProduct() === $this) {
$avi->setProduct(null);
}
}
return $this;
}
public function getPack(): ?Pack
{
return $this->pack;
}
public function setPack(?Pack $pack): self
{
$this->pack = $pack;
return $this;
}
public function getNbGuest(): ?int
{
return $this->nbGuest;
}
public function setNbGuest(?int $nbGuest): self
{
$this->nbGuest = $nbGuest;
return $this;
}
public function getYoutubeVideo(): ?string
{
return $this->youtubeVideo;
}
public function setYoutubeVideo(?string $youtubeVideo): self
{
$this->youtubeVideo = $youtubeVideo;
return $this;
}
public function getIsActivated(): ?bool
{
return $this->isActivated;
}
public function setIsActivated(bool $isActivated): self
{
$this->isActivated = $isActivated;
return $this;
}
/**
* @return false
*/
public function getIsDesactivatedByAdmin(): bool
{
return $this->isDesactivatedByAdmin;
}
/**
* @param false $isDesactivatedByAdmin
* @return Product
*/
public function setIsDesactivatedByAdmin(bool $isDesactivatedByAdmin): Product
{
$this->isDesactivatedByAdmin = $isDesactivatedByAdmin;
return $this;
}
public function getModeLivraison(): ?array
{
return $this->modeLivraison;
}
public function setModeLivraison(?array $modeLivraison): self
{
$this->modeLivraison = $modeLivraison;
return $this;
}
public function getFraisLivraison(): ?float
{
return $this->fraisLivraison;
}
public function setFraisLivraison(?float $fraisLivraison): self
{
$this->fraisLivraison = $fraisLivraison;
return $this;
}
public function getColors(): ?array
{
return $this->colors;
}
public function setColors(?array $colors): self
{
$this->colors = $colors;
return $this;
}
/**
* @return Collection|ProductPercent[]
*/
public function getProductPercents(): Collection
{
return $this->productPercents;
}
public function addProductPercent(ProductPercent $productPercent): self
{
if (!$this->productPercents->contains($productPercent)) {
$this->productPercents[] = $productPercent;
$productPercent->setProduct($this);
}
return $this;
}
public function removeProductPercent(ProductPercent $productPercent): self
{
if ($this->productPercents->contains($productPercent)) {
$this->productPercents->removeElement($productPercent);
// set the owning side to null (unless already changed)
if ($productPercent->getProduct() === $this) {
$productPercent->setProduct(null);
}
}
return $this;
}
public function getProductNamePrice()
{
return $this->name . ' - ' . $this->price . '€ - ' . $this->getCompany()->getCompanyName();
}
public function getSizeRing(): ?array
{
return $this->sizeRing;
}
public function setSizeRing(?array $sizeRing): self
{
$this->sizeRing = $sizeRing;
return $this;
}
/**
* @return Collection|ContactProduct[]
*/
public function getContactProducts(): Collection
{
return $this->contactProducts;
}
public function addContactProduct(ContactProduct $contactProduct): self
{
if (!$this->contactProducts->contains($contactProduct)) {
$this->contactProducts[] = $contactProduct;
$contactProduct->setProduct($this);
}
return $this;
}
public function removeContactProduct(ContactProduct $contactProduct): self
{
if ($this->contactProducts->contains($contactProduct)) {
$this->contactProducts->removeElement($contactProduct);
// set the owning side to null (unless already changed)
if ($contactProduct->getProduct() === $this) {
$contactProduct->setProduct(null);
}
}
return $this;
}
/**
* @return Collection|ProductOption[]
*/
public function getProductOptions(): Collection
{
return $this->productOptions;
}
public function addProductOption(ProductOption $productOption): self
{
if (!$this->productOptions->contains($productOption)) {
$this->productOptions[] = $productOption;
$productOption->setProduct($this);
}
return $this;
}
public function removeProductOption(ProductOption $productOption): self
{
if ($this->productOptions->removeElement($productOption)) {
// set the owning side to null (unless already changed)
if ($productOption->getProduct() === $this) {
$productOption->setProduct(null);
}
}
return $this;
}
/**
* @return Collection|SubCategory[]
*/
public function getSubCategories(): Collection
{
return $this->subCategories;
}
public function addSubCategory(SubCategory $subCategory): self
{
if (!$this->subCategories->contains($subCategory)) {
$this->subCategories[] = $subCategory;
}
return $this;
}
public function removeSubCategory(SubCategory $subCategory): self
{
$this->subCategories->removeElement($subCategory);
return $this;
}
public function getWeight(): ?string
{
return $this->weight;
}
public function setWeight(?string $weight): self
{
$this->weight = $weight;
return $this;
}
public function getTransporteurs(): ?array
{
return $this->transporteurs;
}
public function setTransporteurs(?array $transporteurs): self
{
$this->transporteurs = $transporteurs;
return $this;
}
public function getCodePromo(): ?string
{
return $this->codePromo;
}
public function setCodePromo(?string $codePromo): self
{
$this->codePromo = $codePromo;
return $this;
}
public function getCodePromoEuro(): ?float
{
return $this->codePromoEuro;
}
public function setCodePromoEuro(?float $codePromoEuro): self
{
$this->codePromoEuro = $codePromoEuro;
return $this;
}
public function getProductDescription(): ?ProductDescription
{
return $this->productDescription;
}
public function setProductDescription(?ProductDescription $productDescription): self
{
// unset the owning side of the relation if necessary
if ($productDescription === null && $this->productDescription !== null) {
$this->productDescription->setProduct(null);
}
// set the owning side of the relation if necessary
if ($productDescription !== null && $productDescription->getProduct() !== $this) {
$productDescription->setProduct($this);
}
$this->productDescription = $productDescription;
return $this;
}
public function getTemplate(): ?int
{
return $this->template;
}
public function setTemplate(?int $template): self
{
$this->template = $template;
return $this;
}
/**
* @return Collection|AnnonceCompany[]
*/
public function getAnnonceCompanies(): Collection
{
return $this->annonceCompanies;
}
public function addAnnonceCompany(AnnonceCompany $annonceCompany): self
{
if (!$this->annonceCompanies->contains($annonceCompany)) {
$this->annonceCompanies[] = $annonceCompany;
$annonceCompany->setProducts($this);
}
return $this;
}
public function removeAnnonceCompany(AnnonceCompany $annonceCompany): self
{
if ($this->annonceCompanies->removeElement($annonceCompany)) {
// set the owning side to null (unless already changed)
if ($annonceCompany->getProducts() === $this) {
$annonceCompany->setProducts(null);
}
}
return $this;
}
public function getTypeLocation(): ?TypeLocation
{
return $this->typeLocation;
}
public function setTypeLocation(?TypeLocation $typeLocation): self
{
$this->typeLocation = $typeLocation;
return $this;
}
public function getTypePrestation(): ?TypePrestation
{
return $this->typePrestation;
}
public function setTypePrestation(?TypePrestation $typePrestation): self
{
$this->typePrestation = $typePrestation;
return $this;
}
/**
* @return Collection|Location[]
*/
public function getLocations(): Collection
{
return $this->locations;
}
public function addLocation(Location $location): self
{
if (!$this->locations->contains($location)) {
$this->locations[] = $location;
$location->setProduct($this);
}
return $this;
}
public function removeLocation(Location $location): self
{
if ($this->locations->removeElement($location)) {
// set the owning side to null (unless already changed)
if ($location->getProduct() === $this) {
$location->setProduct(null);
}
}
return $this;
}
/**
* @return Collection|Reservation[]
*/
public function getReservations(): Collection
{
return $this->reservations;
}
public function addReservation(Reservation $reservation): self
{
if (!$this->reservations->contains($reservation)) {
$this->reservations[] = $reservation;
$reservation->setProduct($this);
}
return $this;
}
public function removeReservation(Reservation $reservation): self
{
if ($this->reservations->removeElement($reservation)) {
// set the owning side to null (unless already changed)
if ($reservation->getProduct() === $this) {
$reservation->setProduct(null);
}
}
return $this;
}
public function getTva(): ?Tva
{
return $this->tva;
}
public function setTva(?Tva $tva): self
{
$this->tva = $tva;
return $this;
}
/**
* @return Collection|Caution[]
*/
public function getCautions(): Collection
{
return $this->cautions;
}
public function addCaution(Caution $caution): self
{
if (!$this->cautions->contains($caution)) {
$this->cautions[] = $caution;
$caution->setProduct($this);
}
return $this;
}
public function removeCaution(Caution $caution): self
{
if ($this->cautions->removeElement($caution)) {
// set the owning side to null (unless already changed)
if ($caution->getProduct() === $this) {
$caution->setProduct(null);
}
}
return $this;
}
/**
* @return Collection|Participant[]
*/
public function getParticipants(): Collection
{
return $this->participants;
}
public function addParticipant(Participant $participant): self
{
if (!$this->participants->contains($participant)) {
$this->participants[] = $participant;
$participant->setProduit($this);
}
return $this;
}
public function removeParticipant(Participant $participant): self
{
if ($this->participants->removeElement($participant)) {
// set the owning side to null (unless already changed)
if ($participant->getProduit() === $this) {
$participant->setProduit(null);
}
}
return $this;
}
public function getTypeHebergements(): ?TypeHebergement
{
return $this->typeHebergements;
}
public function setTypeHebergements(?TypeHebergement $typeHebergements): self
{
$this->typeHebergements = $typeHebergements;
return $this;
}
/**
* @return Collection|Chambre[]
*/
public function getChambres(): Collection
{
return $this->chambres;
}
public function addChambre(Chambre $chambre): self
{
if (!$this->chambres->contains($chambre)) {
$this->chambres[] = $chambre;
$chambre->setProduct($this);
}
return $this;
}
public function removeChambre(Chambre $chambre): self
{
$this->chambres->removeElement($chambre);
return $this;
}
/**
* @return Collection|Caracteristic[]
*/
public function getCaracteristics(): Collection
{
return $this->caracteristics;
}
public function addCaracteristic(Caracteristic $caracteristic): self
{
if (!$this->caracteristics->contains($caracteristic)) {
$this->caracteristics[] = $caracteristic;
$caracteristic->addProduct($this);
}
return $this;
}
public function removeCaracteristic(Caracteristic $caracteristic): self
{
if ($this->caracteristics->removeElement($caracteristic)) {
$caracteristic->removeProduct($this);
}
return $this;
}
/**
* @return Collection|Equipment[]
*/
public function getEquipment(): Collection
{
return $this->equipment;
}
public function addEquipment(Equipment $equipment): self
{
if (!$this->equipment->contains($equipment)) {
$this->equipment[] = $equipment;
$equipment->addProduct($this);
}
return $this;
}
public function removeEquipment(Equipment $equipment): self
{
if ($this->equipment->removeElement($equipment)) {
$equipment->removeProduct($this);
}
return $this;
}
/**
* @return Collection|LangueHote[]
*/
public function getLangueHotes(): Collection
{
return $this->langueHotes;
}
public function addLangueHote(LangueHote $langueHote): self
{
if (!$this->langueHotes->contains($langueHote)) {
$this->langueHotes[] = $langueHote;
$langueHote->addProduct($this);
}
return $this;
}
public function removeLangueHote(LangueHote $langueHote): self
{
if ($this->langueHotes->removeElement($langueHote)) {
$langueHote->removeProduct($this);
}
return $this;
}
/**
* @return Collection|TypeLocalisation[]
*/
public function getTypeLocalisations(): Collection
{
return $this->typeLocalisations;
}
public function addTypeLocalisation(TypeLocalisation $typeLocalisation): self
{
if (!$this->typeLocalisations->contains($typeLocalisation)) {
$this->typeLocalisations[] = $typeLocalisation;
$typeLocalisation->addProduct($this);
}
return $this;
}
public function removeTypeLocalisation(TypeLocalisation $typeLocalisation): self
{
if ($this->typeLocalisations->removeElement($typeLocalisation)) {
$typeLocalisation->removeProduct($this);
}
return $this;
}
/**
* @return Collection|Security[]
*/
public function getSecurities(): Collection
{
return $this->securities;
}
public function addSecurity(Security $security): self
{
if (!$this->securities->contains($security)) {
$this->securities[] = $security;
$security->addProduct($this);
}
return $this;
}
public function removeSecurity(Security $security): self
{
if ($this->securities->removeElement($security)) {
$security->removeProduct($this);
}
return $this;
}
public function getTaxeSejour(): ?float
{
return $this->taxeSejour;
}
public function setTaxeSejour(?float $taxeSejour): self
{
$this->taxeSejour = $taxeSejour;
return $this;
}
public function getPrixCaution(): ?float
{
return $this->prixCaution;
}
public function setPrixCaution(?float $prixCaution): self
{
$this->prixCaution = $prixCaution;
return $this;
}
public function getLongitude(): ?float
{
return $this->longitude;
}
public function setLongitude(?float $longitude): self
{
$this->longitude = $longitude;
return $this;
}
public function getLatitude(): ?float
{
return $this->latitude;
}
public function setLatitude(?float $latitude): self
{
$this->latitude = $latitude;
return $this;
}
public function getTypeActivity(): ?ActivityType
{
return $this->typeActivity;
}
public function setTypeActivity(?ActivityType $typeActivity): self
{
$this->typeActivity = $typeActivity;
return $this;
}
/**
* @return Collection<int, ProductReduction>
*/
public function getProductReductions(): Collection
{
return $this->productReductions;
}
public function addProductReduction(ProductReduction $productReduction): self
{
if (!$this->productReductions->contains($productReduction)) {
$this->productReductions[] = $productReduction;
$productReduction->setProduct($this);
}
return $this;
}
public function removeProductReduction(ProductReduction $productReduction): self
{
if ($this->productReductions->removeElement($productReduction)) {
// set the owning side to null (unless already changed)
if ($productReduction->getProduct() === $this) {
$productReduction->setProduct(null);
}
}
return $this;
}
public function getSpringPrice(): ?float
{
return $this->springPrice;
}
public function setSpringPrice(?float $springPrice): self
{
$this->springPrice = $springPrice;
return $this;
}
public function getSummerPrice(): ?float
{
return $this->summerPrice;
}
public function setSummerPrice(?float $summerPrice): self
{
$this->summerPrice = $summerPrice;
return $this;
}
public function getAutumnPrice(): ?float
{
return $this->autumnPrice;
}
public function setAutumnPrice(?float $autumnPrice): self
{
$this->autumnPrice = $autumnPrice;
return $this;
}
public function getWinterPrice(): ?float
{
return $this->winterPrice;
}
public function setWinterPrice(?float $winterPrice): self
{
$this->winterPrice = $winterPrice;
return $this;
}
public function getWeekEndPrice(): ?float
{
return $this->weekEndPrice;
}
public function setWeekEndPrice(?float $weekEndPrice): self
{
$this->weekEndPrice = $weekEndPrice;
return $this;
}
/**
* @return Collection<int, ProgrammingDayPrice>
*/
public function getDayPrice(): Collection
{
return $this->dayPrice;
}
public function addDayPrice(ProgrammingDayPrice $dayPrice): self
{
if (!$this->dayPrice->contains($dayPrice)) {
$this->dayPrice[] = $dayPrice;
$dayPrice->setProduct($this);
}
return $this;
}
public function removeDayPrice(ProgrammingDayPrice $dayPrice): self
{
if ($this->dayPrice->removeElement($dayPrice)) {
// set the owning side to null (unless already changed)
if ($dayPrice->getProduct() === $this) {
$dayPrice->setProduct(null);
}
}
return $this;
}
/**
* @return Collection<int, ProductAgenda>
*/
public function getProductAgendas(): Collection
{
return $this->productAgendas;
}
public function addProductAgenda(ProductAgenda $productAgenda): self
{
if (!$this->productAgendas->contains($productAgenda)) {
$this->productAgendas[] = $productAgenda;
$productAgenda->setProduct($this);
}
}
public function removeProductAgenda(ProductAgenda $productAgenda): self
{
if ($this->productAgendas->removeElement($productAgenda)) {
// set the owning side to null (unless already changed)
if ($productAgenda->getProduct() === $this) {
$productAgenda->setProduct(null);
}
}
}
/**
* @return Collection<int, ProductAutoReduction>
*/
public function getProductAutoReduction(): Collection
{
return $this->productAutoReduction;
}
public function addProductAutoReduction(ProductAutoReduction $productAutoReduction): self
{
if (!$this->productAutoReduction->contains($productAutoReduction)) {
$this->productAutoReduction[] = $productAutoReduction;
$productAutoReduction->setProduct($this);
}
return $this;
}
public function removeProductAutoReduction(ProductAutoReduction $productAutoReduction): self
{
if ($this->productAutoReduction->removeElement($productAutoReduction)) {
// set the owning side to null (unless already changed)
if ($productAutoReduction->getProduct() === $this) {
$productAutoReduction->setProduct(null);
}
}
return $this;
}
/**
* @return Collection<int, Publication>
*/
public function getPublications(): Collection
{
return $this->publications;
}
public function addPublication(Publication $publication): self
{
if (!$this->publications->contains($publication)) {
$this->publications[] = $publication;
$publication->setProductCompany($this);
}
return $this;
}
public function removePublication(Publication $publication): self
{
if ($this->publications->removeElement($publication)) {
// set the owning side to null (unless already changed)
if ($publication->getProductCompany() === $this) {
$publication->setProductCompany(null);
}
}
return $this;
}
/**
* @return Collection<int, PendingLocation>
*/
public function getPendingLocations(): Collection
{
return $this->pendingLocations;
}
public function addPendingLocation(PendingLocation $pendingLocation): self
{
if (!$this->pendingLocations->contains($pendingLocation)) {
$this->pendingLocations[] = $pendingLocation;
$pendingLocation->setProduct($this);
}
return $this;
}
public function removePendingLocation(PendingLocation $pendingLocation): self
{
if ($this->pendingLocations->removeElement($pendingLocation)) {
// set the owning side to null (unless already changed)
if ($pendingLocation->getProduct() === $this) {
$pendingLocation->setProduct(null);
}
}
return $this;
}
/**
* @return Collection<int, PendingReservation>
*/
public function getPendingReservations(): Collection
{
return $this->pendingReservations;
}
public function addPendingReservation(PendingReservation $pendingReservation): self
{
if (!$this->pendingReservations->contains($pendingReservation)) {
$this->pendingReservations[] = $pendingReservation;
$pendingReservation->setProduct($this);
}
return $this;
}
public function removePendingReservation(PendingReservation $pendingReservation): self
{
if ($this->pendingReservations->removeElement($pendingReservation)) {
// set the owning side to null (unless already changed)
if ($pendingReservation->getProduct() === $this) {
$pendingReservation->setProduct(null);
}
}
return $this;
}
/**
* @return Collection<int, ProductPeriodPrice>
*/
public function getPeriodPrice(): Collection
{
return $this->periodPrice;
}
public function addPeriodPrice(ProductPeriodPrice $periodPrice): self
{
if (!$this->periodPrice->contains($periodPrice)) {
$this->periodPrice[] = $periodPrice;
$periodPrice->setProduct($this);
}
return $this;
}
public function removePeriodPrice(ProductPeriodPrice $periodPrice): self
{
if ($this->periodPrice->removeElement($periodPrice)) {
// set the owning side to null (unless already changed)
if ($periodPrice->getProduct() === $this) {
$periodPrice->setProduct(null);
}
}
return $this;
}
public function getCityLocalisation(): ?string
{
return $this->cityLocalisation;
}
public function setCityLocalisation(?string $cityLocalisation): self
{
$this->cityLocalisation = $cityLocalisation;
return $this;
}
public function getNbChambre(): ?int
{
return $this->nbChambre;
}
public function setNbChambre(?int $nbChambre): self
{
$this->nbChambre = $nbChambre;
return $this;
}
public function getNightMin(): ?int
{
return $this->nightMin;
}
public function setNightMin(?int $nightMin): self
{
$this->nightMin = $nightMin;
return $this;
}
/**
* @return Collection<int, TarifDegressif>
*/
public function getTarifDegressifs(): Collection
{
return $this->tarifDegressifs;
}
public function addTarifDegressif(TarifDegressif $tarifDegressif): self
{
if (!$this->tarifDegressifs->contains($tarifDegressif)) {
$this->tarifDegressifs[] = $tarifDegressif;
$tarifDegressif->setProduct($this);
}
return $this;
}
public function removeTarifDegressif(TarifDegressif $tarifDegressif): self
{
if ($this->tarifDegressifs->removeElement($tarifDegressif)) {
// set the owning side to null (unless already changed)
if ($tarifDegressif->getProduct() === $this) {
$tarifDegressif->setProduct(null);
}
}
return $this;
}
/**
* @return Collection<int, EquipementsCuisine>
*/
public function getEquipementsCuisines(): Collection
{
return $this->equipementsCuisines;
}
public function addEquipementsCuisine(EquipementsCuisine $equipementsCuisine): self
{
if (!$this->equipementsCuisines->contains($equipementsCuisine)) {
$this->equipementsCuisines[] = $equipementsCuisine;
$equipementsCuisine->addProduct($this);
}
return $this;
}
public function removeEquipementsCuisine(EquipementsCuisine $equipementsCuisine): self
{
if ($this->equipementsCuisines->removeElement($equipementsCuisine)) {
$equipementsCuisine->removeProduct($this);
}
return $this;
}
/**
* @return Collection<int, SalleDeBain>
*/
public function getSalleDeBains(): Collection
{
return $this->salleDeBains;
}
public function addSalleDeBain(SalleDeBain $salleDeBain): self
{
if (!$this->salleDeBains->contains($salleDeBain)) {
$this->salleDeBains[] = $salleDeBain;
$salleDeBain->addProduct($this);
}
return $this;
}
public function removeSalleDeBain(SalleDeBain $salleDeBain): self
{
if ($this->salleDeBains->removeElement($salleDeBain)) {
$salleDeBain->removeProduct($this);
}
return $this;
}
/**
* @return Collection<int, AccessoiresDeChambre>
*/
public function getAccessoiresDeChambres(): Collection
{
return $this->accessoiresDeChambres;
}
public function addAccessoiresDeChambre(AccessoiresDeChambre $accessoiresDeChambre): self
{
if (!$this->accessoiresDeChambres->contains($accessoiresDeChambre)) {
$this->accessoiresDeChambres[] = $accessoiresDeChambre;
$accessoiresDeChambre->addProduct($this);
}
return $this;
}
public function removeAccessoiresDeChambre(AccessoiresDeChambre $accessoiresDeChambre): self
{
if ($this->accessoiresDeChambres->removeElement($accessoiresDeChambre)) {
$accessoiresDeChambre->removeProduct($this);
}
return $this;
}
/**
* @return Collection<int, MobilierExterieur>
*/
public function getMobilierExterieurs(): Collection
{
return $this->mobilierExterieurs;
}
public function addMobilierExterieur(MobilierExterieur $mobilierExterieur): self
{
if (!$this->mobilierExterieurs->contains($mobilierExterieur)) {
$this->mobilierExterieurs[] = $mobilierExterieur;
$mobilierExterieur->addProduct($this);
}
return $this;
}
public function removeMobilierExterieur(MobilierExterieur $mobilierExterieur): self
{
if ($this->mobilierExterieurs->removeElement($mobilierExterieur)) {
$mobilierExterieur->removeProduct($this);
}
return $this;
}
public function getCaracteristiqueVehicule(): ?CaracteristiqueVehicule
{
return $this->caracteristiqueVehicule;
}
public function setCaracteristiqueVehicule(?CaracteristiqueVehicule $caracteristiqueVehicule): self
{
$this->caracteristiqueVehicule = $caracteristiqueVehicule;
return $this;
}
/**
* @return Collection<int, Notification>
*/
public function getNotificationReservation(): Collection
{
return $this->notificationReservation;
}
public function addNotificationReservation(Notification $notificationReservation): self
{
if (!$this->notificationReservation->contains($notificationReservation)) {
$this->notificationReservation[] = $notificationReservation;
$notificationReservation->setProduct($this);
}
return $this;
}
public function removeNotificationReservation(Notification $notificationReservation): self
{
if ($this->notificationReservation->removeElement($notificationReservation)) {
// set the owning side to null (unless already changed)
if ($notificationReservation->getProduct() === $this) {
$notificationReservation->setProduct(null);
}
}
return $this;
}
public function getCommune(): ?Commune
{
return $this->commune;
}
public function setCommune(?Commune $commune): self
{
$this->commune = $commune;
return $this;
}
}