<?php
namespace App\Entity;
use App\AclPermission\Annotation\AclPermission;
use App\Repository\HotelRepository;
use App\Validator\UniqueSubdomain;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
/**
* @Vich\Uploadable
* @ORM\Entity(repositoryClass=HotelRepository::class)
* @UniqueSubdomain
* @AclPermission(scopes={"class", "object"}, permissions={"VIEW", "CREATE", "EDIT", "DELETE"}, permissionsOnlyForClassScope={"CREATE"}, position=1)
*/
class Hotel extends BehaviorsMappedSuperclass
{
/**
* @ORM\Id
* @ORM\Column(type="uuid", unique=true)
* @ORM\GeneratedValue(strategy="CUSTOM")
* @ORM\CustomIdGenerator(class=UuidGenerator::class)
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $description;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $tax;
/**
* @ORM\ManyToMany(targetEntity=User::class, inversedBy="hotels")
* @ORM\JoinTable(name="user_hotel")
*/
private $users;
/**
* @ORM\ManyToMany(targetEntity=TourOperator::class, mappedBy="hotels")
* @ORM\JoinTable(name="hotel_tour_operator")
*/
private $tourOperators;
/**
* @ORM\OneToMany(targetEntity=Department::class, mappedBy="hotel")
*/
private $departments;
/**
* @ORM\OneToMany(targetEntity=Report::class, mappedBy="hotel")
*/
private $reports;
/**
* @ORM\OneToMany(targetEntity=Detail::class, mappedBy="hotel")
*/
private $details;
/**
* @ORM\OneToMany(targetEntity=Reporting::class, mappedBy="hotel")
*/
private $reportings;
/**
* @ORM\OneToMany(targetEntity=Room::class, mappedBy="hotel")
*/
private $rooms;
/**
* @ORM\ManyToMany(targetEntity=Guest::class, mappedBy="hotels")
* @ORM\JoinTable(name="hotel_guest")
*/
private $guests;
/**
* @ORM\OneToMany(targetEntity=Restaurant::class, mappedBy="hotel")
*/
private $restaurants;
/**
* @ORM\OneToMany(targetEntity=Ticket::class, mappedBy="hotel")
*/
private $tickets;
/**
* @ORM\OneToMany(targetEntity=Product::class, mappedBy="hotel")
*/
private $products;
/**
* @ORM\ManyToOne(targetEntity=Complex::class, inversedBy="hotels")
* @ORM\JoinColumn(nullable=false)
*/
private $complex;
/**
* @ORM\ManyToMany(targetEntity=User::class, inversedBy="assignedHotels")
* @ORM\JoinTable(name="user_hotel_assigned")
*/
private $assignedUsers;
/**
* @ORM\ManyToOne(targetEntity=User::class, cascade={"persist", "remove"}, fetch="EAGER")
* @ORM\JoinColumn(nullable=false)
*/
private $blameableUser;
/**
* @ORM\ManyToMany(targetEntity=Media::class, cascade={"persist"})
*/
private $medias;
/**
* @ORM\OneToMany(targetEntity=Group::class, mappedBy="hotel")
*/
private $groups;
/**
* @ORM\Column(type="string", length=255, unique=true)
*/
private $subdomain;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $pmsConnection;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $pmsForbiddenEmailDomains;
/**
* @ORM\OneToMany(targetEntity=Order::class, mappedBy="hotel")
*/
private $orders;
/**
* @ORM\OneToMany(targetEntity=Invoice::class, mappedBy="hotel")
*/
private $invoices;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $address1;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $address2;
/**
* @ORM\Column(type="string", length=20, nullable=true)
*/
private $postalCode;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $city;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $state;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $country;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private $tin;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $fiscalName;
/**
* @ORM\Column(type="string", length=20, nullable=true)
*/
private $invoiceSerie;
/**
* @ORM\OneToMany(targetEntity=Page::class, mappedBy="hotel")
* @ORM\OrderBy({"sortOrder" = "ASC"})
*/
private $pages;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $replyToEmail;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $orderEmailsTo;
/**
* @ORM\Column(type="boolean")
*/
private $countInfantsForRestaurantReserves;
/**
* @ORM\Column(type="boolean")
*/
private $errorsMuted;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $stripePublishableKey;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $stripeSecretKey;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $googleTagStreamId;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $googleTagMeasurementId;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $restaurantReserveHomePosition;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $createTicketHomePosition;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @var string
*/
private $restaurantReserveHomeImage;
/**
* @Vich\UploadableField(mapping="hotel", fileNameProperty="restaurantReserveHomeImage")
* @var File
*/
private $restaurantReserveHomeImageFile;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @var string
*/
private $createTicketHomeImage;
/**
* @Vich\UploadableField(mapping="hotel", fileNameProperty="createTicketHomeImage")
* @var File
*/
private $createTicketHomeImageFile;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $lastPmsUpdatedAt;
/**
* @ORM\ManyToOne(targetEntity=User::class)
*/
private $ticketCallAssignedUser;
/**
* @ORM\OneToMany(targetEntity=WiFiPremium::class, mappedBy="hotel")
*/
private $wiFiPremiums;
/**
* @ORM\Column(type="boolean")
*/
private $greenApiActive;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $greenApiId;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $greenApiToken;
public function __construct()
{
$this->users = new ArrayCollection();
$this->assignedUsers = new ArrayCollection();
$this->tourOperators = new ArrayCollection();
$this->departments = new ArrayCollection();
$this->reports = new ArrayCollection();
$this->details = new ArrayCollection();
$this->rooms = new ArrayCollection();
$this->guests = new ArrayCollection();
$this->restaurants = new ArrayCollection();
$this->tickets = new ArrayCollection();
$this->products = new ArrayCollection();
$this->medias = new ArrayCollection();
$this->groups = new ArrayCollection();
$this->orders = new ArrayCollection();
$this->invoices = new ArrayCollection();
$this->pages = new ArrayCollection();
$this->wiFiPremiums = new ArrayCollection();
$this->countInfantsForRestaurantReserves = false;
$this->errorsMuted = false;
$this->greenApiActive = false;
}
public function __toString(): string
{
return $this->getName();
}
public function getId()
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getTax(): ?int
{
return $this->tax;
}
public function setTax(?int $tax): self
{
$this->tax = $tax;
return $this;
}
/**
* @return Collection|User[]
*/
public function getUsers(): Collection
{
return $this->users;
}
public function addUser(User $user): self
{
if (!$this->users->contains($user)) {
$this->users[] = $user;
}
return $this;
}
public function removeUser(User $user): self
{
$this->users->removeElement($user);
return $this;
}
/**
* @return Collection|TourOperator[]
*/
public function getTourOperators(): Collection
{
return $this->tourOperators;
}
public function addTourOperator(TourOperator $tourOperator): self
{
if (!$this->tourOperators->contains($tourOperator)) {
$this->tourOperators[] = $tourOperator;
$tourOperator->addHotel($this);
}
return $this;
}
public function removeTourOperator(TourOperator $tourOperator): self
{
if ($this->tourOperators->removeElement($tourOperator)) {
$tourOperator->removeHotel($this);
}
return $this;
}
/**
* @return Collection|Department[]
*/
public function getDepartments(): Collection
{
return $this->departments;
}
public function addDepartment(Department $department): self
{
if (!$this->departments->contains($department)) {
$this->departments[] = $department;
$department->setHotel($this);
}
return $this;
}
public function removeDepartment(Department $department): self
{
if ($this->departments->removeElement($department)) {
// set the owning side to null (unless already changed)
if ($department->getHotel() === $this) {
$department->setHotel(null);
}
}
return $this;
}
/**
* @return Collection|Report[]
*/
public function getReports(): Collection
{
return $this->reports;
}
public function addReport(Report $report): self
{
if (!$this->reports->contains($report)) {
$this->reports[] = $report;
$report->setHotel($this);
}
return $this;
}
public function removeReport(Report $report): self
{
if ($this->reports->removeElement($report)) {
// set the owning side to null (unless already changed)
if ($report->getHotel() === $this) {
$report->setHotel(null);
}
}
return $this;
}
/**
* @return Collection|Detail[]
*/
public function getDetails(): Collection
{
return $this->details;
}
public function addDetail(Detail $detail): self
{
if (!$this->details->contains($detail)) {
$this->details[] = $detail;
$detail->setHotel($this);
}
return $this;
}
public function removeDetail(Detail $detail): self
{
if ($this->details->removeElement($detail)) {
// set the owning side to null (unless already changed)
if ($detail->getHotel() === $this) {
$detail->setHotel(null);
}
}
return $this;
}
/**
* @return Collection|Reporting[]
*/
public function getReportings(): Collection
{
return $this->reportings;
}
public function addReporting(Reporting $reporting): self
{
if (!$this->reportings->contains($reporting)) {
$this->reportings[] = $reporting;
$reporting->setHotel($this);
}
return $this;
}
public function removeReporting(Reporting $reporting): self
{
if ($this->reportings->removeElement($reporting)) {
// set the owning side to null (unless already changed)
if ($reporting->getHotel() === $this) {
$reporting->setHotel(null);
}
}
return $this;
}
/**
* @return Collection|Room[]
*/
public function getRooms(): Collection
{
return $this->rooms;
}
public function addRoom(Room $room): self
{
if (!$this->rooms->contains($room)) {
$this->rooms[] = $room;
$room->setHotel($this);
}
return $this;
}
public function removeRoom(Room $room): self
{
if ($this->rooms->removeElement($room)) {
// set the owning side to null (unless already changed)
if ($room->getHotel() === $this) {
$room->setHotel(null);
}
}
return $this;
}
/**
* @return Collection|Guest[]
*/
public function getGuests(): Collection
{
return $this->guests;
}
public function addGuest(Guest $guest): self
{
if (!$this->guests->contains($guest)) {
$this->guests[] = $guest;
$guest->addHotel($this);
}
return $this;
}
public function removeGuest(Guest $guest): self
{
if ($this->guests->removeElement($guest)) {
$guest->removeHotel($this);
}
return $this;
}
/**
* @return Collection|Restaurant[]
*/
public function getRestaurants(): Collection
{
return $this->restaurants;
}
public function addRestaurant(Restaurant $restaurant): self
{
if (!$this->restaurants->contains($restaurant)) {
$this->restaurants[] = $restaurant;
$restaurant->setHotel($this);
}
return $this;
}
public function removeRestaurant(Restaurant $restaurant): self
{
if ($this->restaurants->removeElement($restaurant)) {
// set the owning side to null (unless already changed)
if ($restaurant->getHotel() === $this) {
$restaurant->setHotel(null);
}
}
return $this;
}
/**
* @return Collection|Ticket[]
*/
public function getTickets(): Collection
{
return $this->tickets;
}
public function addTicket(Ticket $ticket): self
{
if (!$this->tickets->contains($ticket)) {
$this->tickets[] = $ticket;
$ticket->setHotel($this);
}
return $this;
}
public function removeTicket(Ticket $ticket): self
{
if ($this->tickets->removeElement($ticket)) {
// set the owning side to null (unless already changed)
if ($ticket->getHotel() === $this) {
$ticket->setHotel(null);
}
}
return $this;
}
/**
* @return Collection|Product[]
*/
public function getProducts(): Collection
{
return $this->products;
}
public function addProduct(Product $product): self
{
if (!$this->products->contains($product)) {
$this->products[] = $product;
$product->setHotel($this);
}
return $this;
}
public function removeProduct(Product $product): self
{
if ($this->products->removeElement($product)) {
// set the owning side to null (unless already changed)
if ($product->getHotel() === $this) {
$product->setHotel(null);
}
}
return $this;
}
public function getComplex(): ?Complex
{
return $this->complex;
}
public function setComplex(?Complex $complex): self
{
$this->complex = $complex;
return $this;
}
/**
* @return Collection|User[]
*/
public function getAssignedUsers(): Collection
{
return $this->assignedUsers;
}
public function addAssignedUser(User $user): self
{
if (!$this->assignedUsers->contains($user)) {
$this->assignedUsers[] = $user;
}
return $this;
}
public function removeAssignedUser(User $user): self
{
$this->assignedUsers->removeElement($user);
return $this;
}
public function getBlameableUser(): ?User
{
return $this->blameableUser;
}
public function setBlameableUser(User $blameableUser): self
{
$this->blameableUser = $blameableUser;
return $this;
}
/**
* @return Collection|Media[]
*/
public function getMedias(): Collection
{
return $this->medias;
}
public function addMedia(Media $media): self
{
if (!$this->medias->contains($media)) {
$this->medias[] = $media;
}
return $this;
}
public function removeMedia(Media $media): self
{
$this->medias->removeElement($media);
return $this;
}
/**
* @return Collection|Group[]
*/
public function getGroups(): Collection
{
return $this->groups;
}
public function addGroup(Group $group): self
{
if (!$this->groups->contains($group)) {
$this->groups[] = $group;
$group->setHotel($this);
}
return $this;
}
public function removeGroup(Group $group): self
{
if ($this->groups->removeElement($group)) {
// set the owning side to null (unless already changed)
if ($group->getHotel() === $this) {
$group->setHotel(null);
}
}
return $this;
}
public function getSubdomain(): ?string
{
return $this->subdomain;
}
public function setSubdomain(string $subdomain): self
{
$this->subdomain = $subdomain;
return $this;
}
public function getPmsConnection(): ?string
{
return $this->pmsConnection;
}
public function setPmsConnection(?string $pmsConnection): self
{
$this->pmsConnection = $pmsConnection;
return $this;
}
public function getPmsForbiddenEmailDomains(): ?string
{
return $this->pmsForbiddenEmailDomains;
}
public function setPmsForbiddenEmailDomains(?string $pmsForbiddenEmailDomains): self
{
$this->pmsForbiddenEmailDomains = $pmsForbiddenEmailDomains;
return $this;
}
public function isEmailForbidden(?string $email): bool
{
if (empty($email)) {
return false;
}
$domains = array_map('trim', explode(',', $this->getPmsForbiddenEmailDomains()));
$domain = substr(strrchr($email, "@"), 1);
return in_array($domain, $domains, true);
}
/**
* @return Collection|Order[]
*/
public function getOrders(): Collection
{
return $this->orders;
}
public function addOrder(Order $order): self
{
if (!$this->orders->contains($order)) {
$this->orders[] = $order;
$order->setHotel($this);
}
return $this;
}
public function removeOrder(Order $order): self
{
if ($this->orders->removeElement($order)) {
// set the owning side to null (unless already changed)
if ($order->getHotel() === $this) {
$order->setHotel(null);
}
}
return $this;
}
/**
* @return Collection|Invoice[]
*/
public function getInvoices(): Collection
{
return $this->invoices;
}
public function addInvoice(Invoice $invoice): self
{
if (!$this->invoices->contains($invoice)) {
$this->invoices[] = $invoice;
$invoice->setHotel($this);
}
return $this;
}
public function removeInvoice(Invoice $invoice): self
{
if ($this->invoices->removeElement($invoice)) {
// set the owning side to null (unless already changed)
if ($invoice->getHotel() === $this) {
$invoice->setHotel(null);
}
}
return $this;
}
public function getAddress1(): ?string
{
return $this->address1;
}
public function setAddress1(?string $address1): self
{
$this->address1 = $address1;
return $this;
}
public function getAddress2(): ?string
{
return $this->address2;
}
public function setAddress2(?string $address2): self
{
$this->address2 = $address2;
return $this;
}
public function getPostalCode(): ?string
{
return $this->postalCode;
}
public function setPostalCode(?string $postalCode): self
{
$this->postalCode = $postalCode;
return $this;
}
public function getCity(): ?string
{
return $this->city;
}
public function setCity(?string $city): self
{
$this->city = $city;
return $this;
}
public function getState(): ?string
{
return $this->state;
}
public function setState(?string $state): self
{
$this->state = $state;
return $this;
}
public function getCountry(): ?string
{
return $this->country;
}
public function setCountry(?string $country): self
{
$this->country = $country;
return $this;
}
public function getTin(): ?string
{
return $this->tin;
}
public function setTin(?string $tin): self
{
$this->tin = $tin;
return $this;
}
public function getFiscalName(): ?string
{
return $this->fiscalName;
}
public function setFiscalName(?string $fiscalName): self
{
$this->fiscalName = $fiscalName;
return $this;
}
public function getInvoiceSerie(): ?string
{
return $this->invoiceSerie;
}
public function setInvoiceSerie(?string $invoiceSerie): self
{
$this->invoiceSerie = $invoiceSerie;
return $this;
}
/**
* @return Collection|Page[]
*/
public function getPages(): Collection
{
return $this->pages;
}
public function addPage(Page $page): self
{
if (!$this->pages->contains($page)) {
$this->pages[] = $page;
$page->setHotel($this);
}
return $this;
}
public function removePage(Page $page): self
{
if ($this->pages->removeElement($page)) {
// set the owning side to null (unless already changed)
if ($page->getHotel() === $this) {
$page->setHotel(null);
}
}
return $this;
}
public function getOrderEmailsTo(): ?string
{
return $this->orderEmailsTo;
}
public function setOrderEmailTo(?string $orderEmailsTo): self
{
$this->orderEmailsTo = $orderEmailsTo;
return $this;
}
public function getReplyToEmail(): ?string
{
return $this->replyToEmail;
}
public function setReplyToEmail(?string $replyToEmail): self
{
$this->replyToEmail = $replyToEmail;
return $this;
}
public function getCountInfantsForRestaurantReserves(): ?bool
{
return $this->countInfantsForRestaurantReserves;
}
public function setCountInfantsForRestaurantReserves(bool $countInfantsForRestaurantReserves): self
{
$this->countInfantsForRestaurantReserves = $countInfantsForRestaurantReserves;
return $this;
}
public function getErrorsMuted(): ?bool
{
return $this->errorsMuted;
}
public function setErrorsMuted(bool $errorsMuted): self
{
$this->errorsMuted = $errorsMuted;
return $this;
}
public function hasErrorsMuted(): ?bool
{
return $this->getErrorsMuted();
}
public function getLogoMedia(): ?Media
{
return $this->getMediaByCategory(Media::CATEGORY_LOGO);
}
public function getBackgroundMedia(): ?Media
{
return $this->getMediaByCategory(Media::CATEGORY_IMAGE);
}
public function getMediaByCategory(string $category): ?Media
{
foreach ($this->getMedias() as $media) {
if ($media->getCategory() === $category) {
return $media;
}
}
return null;
}
public function getStripePublishableKey(): ?string
{
return $this->stripePublishableKey;
}
public function setStripePublishableKey(?string $stripePublishableKey): self
{
$this->stripePublishableKey = $stripePublishableKey;
return $this;
}
public function getStripeSecretKey(): ?string
{
return $this->stripeSecretKey;
}
public function setStripeSecretKey(?string $stripeSecretKey): self
{
$this->stripeSecretKey = $stripeSecretKey;
return $this;
}
public function isStripeConfigured(): bool
{
return !is_null($this->getStripeSecretKey()) && !is_null($this->getStripePublishableKey());
}
public function getGoogleTagStreamId(): ?string
{
return $this->googleTagStreamId;
}
public function setGoogleTagStreamId(?string $googleTagStreamId): self
{
$this->googleTagStreamId = $googleTagStreamId;
return $this;
}
public function getGoogleTagMeasurementId(): ?string
{
return $this->googleTagMeasurementId;
}
public function setGoogleTagMeasurementId(?string $googleTagMeasurementId): self
{
$this->googleTagMeasurementId = $googleTagMeasurementId;
return $this;
}
public function isGoogleTagConfigured(): bool
{
return !is_null($this->getGoogleTagStreamId()) && !is_null($this->getGoogleTagMeasurementId());
}
public function getRestaurantReserveHomePosition(): ?int
{
return $this->restaurantReserveHomePosition;
}
public function setRestaurantReserveHomePosition(?int $restaurantReserveHomePosition): self
{
$this->restaurantReserveHomePosition = $restaurantReserveHomePosition;
return $this;
}
public function getCreateTicketHomePosition(): ?int
{
return $this->createTicketHomePosition;
}
public function setCreateTicketHomePosition(?int $createTicketHomePosition): self
{
$this->createTicketHomePosition = $createTicketHomePosition;
return $this;
}
public function setRestaurantReserveHomeImageFile(?File $restaurantReserveHomeImage = null)
{
$this->restaurantReserveHomeImageFile = $restaurantReserveHomeImage;
if (null !== $restaurantReserveHomeImage) {
$this->updatedAt = new \DateTime('now');
}
}
public function getRestaurantReserveHomeImageFile()
{
return $this->restaurantReserveHomeImageFile;
}
public function setRestaurantReserveHomeImage($restaurantReserveHomeImage)
{
$this->restaurantReserveHomeImage = $restaurantReserveHomeImage;
}
public function getRestaurantReserveHomeImage()
{
return $this->restaurantReserveHomeImage;
}
public function setCreateTicketHomeImageFile(?File $createTicketHomeImage = null)
{
$this->createTicketHomeImageFile = $createTicketHomeImage;
if (null !== $createTicketHomeImage) {
$this->updatedAt = new \DateTime('now');
}
}
public function getCreateTicketHomeImageFile()
{
return $this->createTicketHomeImageFile;
}
public function setCreateTicketHomeImage($createTicketHomeImage)
{
$this->createTicketHomeImage = $createTicketHomeImage;
}
public function getCreateTicketHomeImage()
{
return $this->createTicketHomeImage;
}
public function getLastPmsUpdatedAt(): ?\DateTimeInterface
{
return $this->lastPmsUpdatedAt;
}
public function setLastPmsUpdatedAt(?\DateTimeInterface $lastPmsUpdatedAt): self
{
$this->lastPmsUpdatedAt = $lastPmsUpdatedAt;
return $this;
}
public function getTicketCallAssignedUser(): ?User
{
return $this->ticketCallAssignedUser;
}
public function setTicketCallAssignedUser(?User $ticketCallAssignedUser): self
{
$this->ticketCallAssignedUser = $ticketCallAssignedUser;
return $this;
}
/**
* @return Collection<int, WiFiPremium>
*/
public function getWiFiPremiums(): Collection
{
return $this->wiFiPremiums;
}
public function addWiFiPremium(WiFiPremium $wiFiPremium): self
{
if (!$this->wiFiPremiums->contains($wiFiPremium)) {
$this->wiFiPremiums[] = $wiFiPremium;
$wiFiPremium->setHotel($this);
}
return $this;
}
public function removeWiFiPremium(WiFiPremium $wiFiPremium): self
{
if ($this->wiFiPremiums->removeElement($wiFiPremium)) {
// set the owning side to null (unless already changed)
if ($wiFiPremium->getHotel() === $this) {
$wiFiPremium->setHotel(null);
}
}
return $this;
}
public function isGreenApiActive(): ?bool
{
return $this->greenApiActive;
}
public function setGreenApiActive(bool $greenApiActive): self
{
$this->greenApiActive = $greenApiActive;
return $this;
}
public function getGreenApiId(): ?string
{
return $this->greenApiId;
}
public function setGreenApiId(?string $greenApiId): self
{
$this->greenApiId = $greenApiId;
return $this;
}
public function getGreenApiToken(): ?string
{
return $this->greenApiToken;
}
public function setGreenApiToken(?string $greenApiToken): self
{
$this->greenApiToken = $greenApiToken;
return $this;
}
}