src/Entity/AccommodationRoom.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Constant\AccommodationType;
  4. use DateTime;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\ORM\Mapping\OrderBy;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * @ORM\Entity
  11.  * @ORM\Table(name="cal_accommodation_room")
  12.  * @ORM\Entity(repositoryClass="App\Repository\AccommodationRoomRepository")
  13.  * @ORM\EntityListeners({"App\Entity\Listener\AccommodationRoomListener"})
  14.  */
  15. class AccommodationRoom
  16. {
  17.     /**
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue
  20.      * @ORM\Column(type="integer")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity="App\Entity\Accommodation", inversedBy="rooms")
  25.      */
  26.     private $accommodation;
  27.     /**
  28.      * @ORM\Column(type="boolean", nullable=true)
  29.      */
  30.     private $eco;
  31.     /**
  32.      * @ORM\OneToOne(targetEntity="App\Entity\Translation", cascade={"persist"}, orphanRemoval=true)
  33.      */
  34.     private $name;
  35.     /**
  36.      * @ORM\OneToOne(targetEntity="App\Entity\Translation", cascade={"persist"}, orphanRemoval=true)
  37.      */
  38.     private $description;
  39.     /**
  40.      * @ORM\Column(type="string", length=255, nullable=true)
  41.      */
  42.     private $externalUrl;
  43.     /**
  44.      * @ORM\Column(type="integer", nullable=true)
  45.      */
  46.     private $surface;
  47.     /**
  48.      * @ORM\ManyToMany(targetEntity="App\Entity\PropertyListItem")
  49.      * @ORM\JoinTable(name="cal_accommodation_rooms_equipments")
  50.      */
  51.     private $equipments;
  52.     /**
  53.      * @ORM\ManyToMany(targetEntity="App\Entity\PropertyListItem")
  54.      * @ORM\JoinTable(name="cal_accommodation_rooms_services")
  55.      */
  56.     private $services;
  57.     /**
  58.      * @ORM\ManyToMany(targetEntity="App\Entity\PropertyListItem")
  59.      * @ORM\JoinTable(name="cal_accommodation_rooms_charges_details")
  60.      */
  61.     private $chargesDetails;
  62.     /**
  63.      * @ORM\Column(type="boolean", nullable=true)
  64.      */
  65.     private $privateBathroom false;
  66.     /**
  67.      * @ORM\Column(type="boolean", nullable=true)
  68.      */
  69.     private $privateToilet false;
  70.     /**
  71.      * @ORM\Column(type="boolean", nullable=true)
  72.      */
  73.     private $privateKitchen false;
  74.     /**
  75.      * @ORM\Column(type="integer", nullable=true)
  76.      */
  77.     private $maxHousingAssistance;
  78.     private $depositFees 750;
  79.     /**
  80.      * @ORM\Column(type="integer")
  81.      */
  82.     private $rent;
  83.     /**
  84.      * @ORM\Column(type="integer", nullable=true)
  85.      */
  86.     private $additionalRent;
  87.     /**
  88.      * @ORM\Column(type="string", length=255, nullable=true)
  89.      */
  90.     private $additionalRentDetails;
  91.     /**
  92.      * @ORM\Column(type="integer")
  93.      */
  94.     private $entranceFees;
  95.     /**
  96.      * @ORM\Column(type="integer")
  97.      */
  98.     private $chargesFees;
  99.     /**
  100.      * @ORM\Column(type="integer")
  101.      */
  102.     private $servicesFees;
  103.     /**
  104.      * @ORM\Column(type="integer", nullable=true)
  105.      */
  106.     private $cleaningFees 20;
  107.     /**
  108.      * @ORM\OneToMany(targetEntity="App\Entity\AccommodationImage", mappedBy="room", cascade={"persist"}, orphanRemoval=true)
  109.      * @ORM\OrderBy({"position" = "ASC"})
  110.      */
  111.     private $images;
  112.     /**
  113.      * @var \DateTime $createdAt
  114.      *
  115.      * @Gedmo\Timestampable(on="create")
  116.      * @ORM\Column(type="datetime")
  117.      */
  118.     private $createdAt;
  119.     /**
  120.      * @var \DateTime $updated
  121.      *
  122.      * @Gedmo\Timestampable(on="update")
  123.      * @ORM\Column(type="datetime")
  124.      */
  125.     private $updatedAt;
  126.     /**
  127.      * @ORM\Column(type="boolean", nullable=true)
  128.      */
  129.     private $disabled false;
  130.     /**
  131.      * @ORM\Column(type="boolean", nullable=true)
  132.      */
  133.     private $bookingDisabled false;
  134.     /**
  135.      * @ORM\Column(type="datetime", nullable=true)
  136.      */
  137.     private $bookingDateFrom;
  138.     /**
  139.      * @ORM\OneToMany(targetEntity="App\Entity\BookingRoom", mappedBy="room")
  140.      */
  141.     private $bookingRooms;
  142.     /**
  143.      * @ORM\OneToMany(targetEntity="App\Entity\UserInfo", mappedBy="room", cascade={"persist"}, orphanRemoval=true)
  144.      * @ORM\OrderBy({"position" = "ASC"})
  145.      */
  146.     private $waitingListUsers;
  147.     /**
  148.      * @ORM\OneToMany(targetEntity="App\Entity\AccommodationZone", mappedBy="room", cascade={"persist"}, orphanRemoval=true)
  149.      * @OrderBy({"priority" = "DESC"})
  150.      */
  151.     private $zones;
  152.     /**
  153.      * @ORM\OneToOne(targetEntity="App\Entity\AccommodationOccupancy", cascade={"persist"}, orphanRemoval=false)
  154.      */
  155.     private $occupancy;
  156.     /**
  157.      * @ORM\OneToMany(targetEntity="App\Entity\AccommodationOccupancy", mappedBy="room")
  158.      * @ORM\OrderBy({"createdAt" = "DESC"})
  159.      */
  160.     private $occupancies;
  161.     /**
  162.      * @ORM\Column(type="boolean", nullable=true)
  163.      */
  164.     private $ongoingBooking false;
  165.     /**
  166.      * @ORM\OneToOne(targetEntity="App\Entity\RoomStats", cascade={"persist"}, orphanRemoval=false)
  167.      */
  168.     private $stats;
  169.     /**
  170.      * @ORM\OneToMany(targetEntity="App\Entity\RoomStats", mappedBy="room")
  171.      * @ORM\OrderBy({"createdAt" = "DESC"})
  172.      */
  173.     private $statsHistory;
  174.     /**
  175.      * @ORM\OneToMany(targetEntity="App\Entity\Maintenance", mappedBy="room")
  176.      */
  177.     private $maintenances;
  178.     /**
  179.      * @ORM\OneToMany  (targetEntity="App\Entity\Survey", mappedBy="room")
  180.      */
  181.     private $surveys;
  182.     //--------------------------------------------------------------
  183.     // Utilities
  184.     //--------------------------------------------------------------
  185.     public function __toString(): string {
  186.         return $this->getName();
  187.     }
  188.     public function __construct()
  189.     {
  190.         $this->images = new ArrayCollection();
  191.         $this->waitingListUsers = new ArrayCollection();
  192.         $this->bookingRooms = new ArrayCollection();
  193.         $this->occupancies = new ArrayCollection();
  194.         $this->zones = new ArrayCollection();
  195.         $this->statsHistory = new ArrayCollection();
  196.         $this->maintenances = new ArrayCollection();
  197.         $this->surveys = new ArrayCollection();
  198.         $this->zones = new ArrayCollection();
  199.     }
  200.     public function getBookingFirstDate($isMove false) {
  201.         $availabilityDate $this->getAvailablilityDate();
  202.         if ($isMove) {
  203.             return max($availabilityDate, new DateTime("+1 month"));
  204.         } else {
  205.             return max($availabilityDate, new DateTime("+3 days"));
  206.         }
  207.     }
  208.     public function getAvailablilityDate()
  209.     {
  210.         // If the room is not bookable
  211.         if($this->isBookingDisabled()) return null;
  212.         // If a booking is ongoing, the room is not available
  213.         if($this->isOngoingBooking()) return null;
  214.         if(!empty($this->getOccupancy())) {
  215.             if(!empty($this->getOccupancy()->getTo()) && ($this->getOccupancy()->isLeaving() || $this->getOccupancy()->isSwitching())) {
  216.                 // If the occupant is leaving, the room is available the day after
  217.                 $date = clone $this->getOccupancy()->getTo();
  218.                 $date->modify("+1 day");
  219.                 return $date;
  220.             } else {
  221.                 // If there is an occupant, the room is not available
  222.                 return null;
  223.             }
  224.         } else {
  225.             if(!empty($this->getBookingDateFrom())) {
  226.                 if ($this->getBookingDateFrom() > new \DateTime()) {
  227.                     return $this->getBookingDateFrom();
  228.                 }
  229.             }
  230.         }
  231.         // The room is available
  232.         return new \DateTime("yesterday");
  233.     }
  234.     public function isAvailable()
  235.     {
  236.         $now = new \DateTime("now");
  237.         return empty($this->isOngoingBooking()) && (!empty($this->getAvailablilityDate()) && $this->getAvailablilityDate() <= $now);
  238.     }
  239.     public function getActiveBookings() {
  240.         return $this->getBookingRooms()->filter(function (BookingRoom $bookingRoom) {
  241.             return $bookingRoom->getBooking()->isActive();
  242.         });
  243.     }
  244.     public function getCurrentRoommate() {
  245.         if (!empty($this->getOccupancy())) {
  246.             return $this->getOccupancy()->getUser();
  247.         } else {
  248.             return null;
  249.         }
  250.     }
  251.     public function isOccupied() {
  252.         return !empty($this->getCurrentRoommate());
  253.     }
  254.     public function hasEmptyZone() {
  255.         if ($this->getZones()->count() === 0) return true;
  256.         $hasEmptyZone false;
  257.         foreach ($this->getZones() as $zone) {
  258.             if ($zone->isEmpty()) $hasEmptyZone true;
  259.         }
  260.         return $hasEmptyZone;
  261.     }
  262.     public function getTotalRent() {
  263.         return $this->getRent() + $this->getChargesFees();
  264.     }
  265.     public function getStatsByMonth($month$year) {
  266.         return $this->getStatsHistory()->filter(function($stats) use($month$year){
  267.             return $stats->getYear() === intval($year) && $stats->getMonth() === intval($month);
  268.         })->first();
  269.     }
  270.     //--------------------------------------------------------------
  271.     // Stats
  272.     //--------------------------------------------------------------
  273.     public function getFullStats() {
  274.         $stat = new RoomStats();
  275.         foreach ($this->getStatsHistory() as $s) {
  276.             $stat->setFreeDays($stat->getFreeDays() + $s->getFreeDays());
  277.             $stat->setTotalDays($stat->getTotalDays() + $s->getTotalDays());
  278.             $stat->setTotalOccupiedDays($stat->getTotalOccupiedDays() + $s->getTotalOccupiedDays());
  279.         }
  280.         return $stat;
  281.     }
  282.     public function getYearStats($year) {
  283.         $stat = new RoomStats();
  284.         foreach ($this->getStatsHistory()->filter(function($s) use($year) {return $s->getYear() === $year;}) as $s) {
  285.             $stat->setFreeDays($stat->getFreeDays() + $s->getFreeDays());
  286.             $stat->setTotalDays($stat->getTotalDays() + $s->getTotalDays());
  287.             $stat->setTotalOccupiedDays($stat->getTotalOccupiedDays() + $s->getTotalOccupiedDays());
  288.         }
  289.         return $stat;
  290.     }
  291.     //--------------------------------------------------------------
  292.     // Collections
  293.     //--------------------------------------------------------------
  294.     public function addImage(AccommodationImage $image)
  295.     {
  296.         $image->setRoom($this);
  297.         $this->images[] = $image;
  298.         return $this;
  299.     }
  300.     public function removeImage(AccommodationImage $image)
  301.     {
  302.         $this->images->removeElement($image);
  303.     }
  304.     public function addWaitingListUser(UserInfo $user)
  305.     {
  306.         $user->setRoom($this);
  307.         $this->waitingListUsers[] = $user;
  308.         return $this;
  309.     }
  310.     public function removeWaitingListUser(UserInfo $user)
  311.     {
  312.         $this->waitingListUsers->removeElement($user);
  313.     }
  314.     public function addFurniture(AccommodationFurniture $furniture)
  315.     {
  316.         $furniture->setRoom($this);
  317.         $this->furnitures[] = $furniture;
  318.         return $this;
  319.     }
  320.     public function removeFurniture(AccommodationFurniture $furniture)
  321.     {
  322.         $this->furnitures->removeElement($furniture);
  323.     }
  324.     public function addOccupancy(AccommodationOccupancy $occupancy)
  325.     {
  326.         $occupancy->setRoom($this);
  327.         $this->occupancies[] = $occupancy;
  328.         return $this;
  329.     }
  330.     public function removeOccupancy(AccommodationOccupancy $occupancy)
  331.     {
  332.         $this->occupancies->removeElement($occupancy);
  333.     }
  334.     //--------------------------------------------------------------
  335.     // Getters and setters
  336.     //--------------------------------------------------------------
  337.     public function getImages()
  338.     {
  339.         return $this->images;
  340.     }
  341.     public function getCover()
  342.     {
  343.         return (!empty($this->images) && count($this->images) > 0) ? $this->images[0] : null;
  344.     }
  345.     public function setImages($images)
  346.     {
  347.         $this->images $images;
  348.     }
  349.     /**
  350.      * @return mixed
  351.      */
  352.     public function getId()
  353.     {
  354.         return $this->id;
  355.     }
  356.     /**
  357.      * @param mixed $id
  358.      */
  359.     public function setId($id)
  360.     {
  361.         $this->id $id;
  362.     }
  363.     /**
  364.      * @return mixed
  365.      */
  366.     public function getName()
  367.     {
  368.         return $this->name;
  369.     }
  370.     /**
  371.      * @param mixed $name
  372.      */
  373.     public function setName($name)
  374.     {
  375.         $this->name $name;
  376.     }
  377.     /**
  378.      * @return mixed
  379.      */
  380.     public function getDescription()
  381.     {
  382.         return $this->description;
  383.     }
  384.     /**
  385.      * @param mixed $description
  386.      */
  387.     public function setDescription($description)
  388.     {
  389.         $this->description $description;
  390.     }
  391.     /**
  392.      * @return mixed
  393.      */
  394.     public function getSurface()
  395.     {
  396.         return $this->surface;
  397.     }
  398.     /**
  399.      * @param mixed $surface
  400.      */
  401.     public function setSurface($surface)
  402.     {
  403.         $this->surface $surface;
  404.     }
  405.     /**
  406.      * @return mixed
  407.      */
  408.     public function getEquipments()
  409.     {
  410.         return $this->equipments;
  411.     }
  412.     /**
  413.      * @param mixed $equipments
  414.      */
  415.     public function setEquipments($equipments)
  416.     {
  417.         $this->equipments $equipments;
  418.     }
  419.     /**
  420.      * @return mixed
  421.      */
  422.     public function getServices()
  423.     {
  424.         return $this->services;
  425.     }
  426.     /**
  427.      * @param mixed $services
  428.      */
  429.     public function setServices($services)
  430.     {
  431.         $this->services $services;
  432.     }
  433.     /**
  434.      * @return mixed
  435.      */
  436.     public function getPrivateBathroom()
  437.     {
  438.         return $this->privateBathroom;
  439.     }
  440.     /**
  441.      * @param mixed $privateBathroom
  442.      */
  443.     public function setPrivateBathroom($privateBathroom)
  444.     {
  445.         $this->privateBathroom $privateBathroom;
  446.     }
  447.     /**
  448.      * @return mixed
  449.      */
  450.     public function getPrivateToilet()
  451.     {
  452.         return $this->privateToilet;
  453.     }
  454.     /**
  455.      * @param mixed $privateToilet
  456.      */
  457.     public function setPrivateToilet($privateToilet)
  458.     {
  459.         $this->privateToilet $privateToilet;
  460.     }
  461.     /**
  462.      * @return mixed
  463.      */
  464.     public function getPrivateKitchen()
  465.     {
  466.         return $this->privateKitchen;
  467.     }
  468.     /**
  469.      * @param mixed $privateKitchen
  470.      */
  471.     public function setPrivateKitchen($privateKitchen)
  472.     {
  473.         $this->privateKitchen $privateKitchen;
  474.     }
  475.     /**
  476.      * @return mixed
  477.      */
  478.     public function getMaxHousingAssistance()
  479.     {
  480.         return $this->maxHousingAssistance;
  481.     }
  482.     /**
  483.      * @param mixed $maxHousingAssistance
  484.      */
  485.     public function setMaxHousingAssistance($maxHousingAssistance)
  486.     {
  487.         $this->maxHousingAssistance $maxHousingAssistance;
  488.     }
  489.     /**
  490.      * @return mixed
  491.      */
  492.     public function getRent()
  493.     {
  494.         return $this->rent;
  495.     }
  496.     /**
  497.      * @param mixed $rent
  498.      */
  499.     public function setRent($rent)
  500.     {
  501.         $this->rent $rent;
  502.     }
  503.     /**
  504.      * @return mixed
  505.      */
  506.     public function getEntranceFees()
  507.     {
  508.         return $this->entranceFees;
  509.     }
  510.     /**
  511.      * @param mixed $entranceFees
  512.      */
  513.     public function setEntranceFees($entranceFees)
  514.     {
  515.         $this->entranceFees $entranceFees;
  516.     }
  517.     /**
  518.      * @return mixed
  519.      */
  520.     public function getChargesFees()
  521.     {
  522.         return $this->chargesFees;
  523.     }
  524.     /**
  525.      * @param mixed $chargesFees
  526.      */
  527.     public function setChargesFees($chargesFees)
  528.     {
  529.         $this->chargesFees $chargesFees;
  530.     }
  531.     /**
  532.      * @return \DateTime
  533.      */
  534.     public function getCreatedAt(): \DateTime
  535.     {
  536.         return $this->createdAt;
  537.     }
  538.     /**
  539.      * @param \DateTime $createdAt
  540.      */
  541.     public function setCreatedAt(\DateTime $createdAt)
  542.     {
  543.         $this->createdAt $createdAt;
  544.     }
  545.     /**
  546.      * @return mixed
  547.      */
  548.     public function getUpdatedAt()
  549.     {
  550.         return $this->updatedAt;
  551.     }
  552.     /**
  553.      * @param mixed $updatedAt
  554.      */
  555.     public function setUpdatedAt($updatedAt)
  556.     {
  557.         $this->updatedAt $updatedAt;
  558.     }
  559.     /**
  560.      * @return mixed
  561.      */
  562.     public function getDisabled()
  563.     {
  564.         return $this->disabled;
  565.     }
  566.     /**
  567.      * @param mixed $disabled
  568.      */
  569.     public function setDisabled($disabled)
  570.     {
  571.         $this->disabled $disabled;
  572.     }
  573.     /**
  574.      * @return mixed
  575.      */
  576.     public function getAccommodation()
  577.     {
  578.         return $this->accommodation;
  579.     }
  580.     /**
  581.      * @param mixed $accommodation
  582.      */
  583.     public function setAccommodation($accommodation)
  584.     {
  585.         $this->accommodation $accommodation;
  586.     }
  587.     /**
  588.      * @return mixed
  589.      */
  590.     public function getBookingRooms()
  591.     {
  592.         return $this->bookingRooms;
  593.     }
  594.     /**
  595.      * @param mixed $bookingRooms
  596.      */
  597.     public function setBookingRooms($bookingRooms)
  598.     {
  599.         $this->bookingRooms $bookingRooms;
  600.     }
  601.     /**
  602.      * @return mixed
  603.      */
  604.     public function getWaitingListUsers()
  605.     {
  606.         return $this->waitingListUsers;
  607.     }
  608.     /**
  609.      * @param mixed $waitingListUsers
  610.      */
  611.     public function setWaitingListUsers($waitingListUsers)
  612.     {
  613.         $this->waitingListUsers $waitingListUsers;
  614.     }
  615.     /**
  616.      * @return mixed
  617.      */
  618.     public function getServicesFees()
  619.     {
  620.         return $this->servicesFees;
  621.     }
  622.     /**
  623.      * @param mixed $servicesFees
  624.      */
  625.     public function setServicesFees($servicesFees): void
  626.     {
  627.         $this->servicesFees $servicesFees;
  628.     }
  629.     /**
  630.      * @param bool $available
  631.      */
  632.     public function setAvailable(bool $available)
  633.     {
  634.         $this->available $available;
  635.     }
  636.     /**
  637.      * @return mixed
  638.      */
  639.     public function getChargesDetails()
  640.     {
  641.         return $this->chargesDetails;
  642.     }
  643.     /**
  644.      * @param mixed $chargesDetails
  645.      */
  646.     public function setChargesDetails($chargesDetails): void
  647.     {
  648.         $this->chargesDetails $chargesDetails;
  649.     }
  650.     /**
  651.      * @return int
  652.      */
  653.     public function getDepositFees(): int
  654.     {
  655.         switch ($this->getAccommodation()->getType()) {
  656.             case AccommodationType::HOUSE: return 1000;
  657.             default: return 750;
  658.         }
  659.     }
  660.     /**
  661.      * @param int $depositFees
  662.      */
  663.     public function setDepositFees(int $depositFees): void
  664.     {
  665.         $this->depositFees $depositFees;
  666.     }
  667.     /**
  668.      * @return mixed
  669.      */
  670.     public function isOngoingBooking()
  671.     {
  672.         return $this->ongoingBooking;
  673.     }
  674.     /**
  675.      * @param bool $ongoingBooking
  676.      */
  677.     public function setOngoingBooking(bool $ongoingBooking): void
  678.     {
  679.         $this->ongoingBooking $ongoingBooking;
  680.     }
  681.     /**
  682.      * @return mixed
  683.      */
  684.     public function getOccupancy()
  685.     {
  686.         return $this->occupancy;
  687.     }
  688.     /**
  689.      * @param mixed $occupancy
  690.      */
  691.     public function setOccupancy($occupancy): void
  692.     {
  693.         $this->occupancy $occupancy;
  694.     }
  695.     /**
  696.      * @return mixed
  697.      */
  698.     public function getOccupancies()
  699.     {
  700.         return $this->occupancies;
  701.     }
  702.     /**
  703.      * @param mixed $occupancies
  704.      */
  705.     public function setOccupancies($occupancies): void
  706.     {
  707.         $this->occupancies $occupancies;
  708.     }
  709.     /**
  710.      * @return mixed
  711.      */
  712.     public function getStats()
  713.     {
  714.         return $this->stats;
  715.     }
  716.     /**
  717.      * @param mixed $stats
  718.      */
  719.     public function setStats($stats): void
  720.     {
  721.         $this->stats $stats;
  722.     }
  723.     /**
  724.      * @return mixed
  725.      */
  726.     public function getStatsHistory()
  727.     {
  728.         return $this->statsHistory;
  729.     }
  730.     /**
  731.      * @param mixed $statsHistory
  732.      */
  733.     public function setStatsHistory($statsHistory): void
  734.     {
  735.         $this->statsHistory $statsHistory;
  736.     }
  737.     /**
  738.      * @return mixed
  739.      */
  740.     public function getZones()
  741.     {
  742.         return $this->zones;
  743.     }
  744.     /**
  745.      * @param mixed $zones
  746.      */
  747.     public function setZones($zones): void
  748.     {
  749.         $this->zones $zones;
  750.     }
  751.     /**
  752.      * @return ArrayCollection
  753.      */
  754.     public function getSurveys()
  755.     {
  756.         return $this->surveys;
  757.     }
  758.     /**
  759.      * @param ArrayCollection $surveys
  760.      */
  761.     public function setSurveys($surveys): void
  762.     {
  763.         $this->surveys $surveys;
  764.     }
  765.     /**
  766.      * @return int
  767.      */
  768.     public function getCleaningFees()
  769.     {
  770.         return $this->cleaningFees;
  771.     }
  772.     /**
  773.      * @param int $cleaningFees
  774.      */
  775.     public function setCleaningFees($cleaningFees): void
  776.     {
  777.         $this->cleaningFees $cleaningFees;
  778.     }
  779.     /**
  780.      * @return mixed
  781.      */
  782.     public function getAdditionalRent()
  783.     {
  784.         return $this->additionalRent;
  785.     }
  786.     /**
  787.      * @param mixed $additionalRent
  788.      */
  789.     public function setAdditionalRent($additionalRent): void
  790.     {
  791.         $this->additionalRent $additionalRent;
  792.     }
  793.     /**
  794.      * @return mixed
  795.      */
  796.     public function getAdditionalRentDetails()
  797.     {
  798.         return $this->additionalRentDetails;
  799.     }
  800.     /**
  801.      * @param mixed $additionalRentDetails
  802.      */
  803.     public function setAdditionalRentDetails($additionalRentDetails): void
  804.     {
  805.         $this->additionalRentDetails $additionalRentDetails;
  806.     }
  807.     /**
  808.      * @return mixed
  809.      */
  810.     public function getExternalUrl()
  811.     {
  812.         return $this->externalUrl;
  813.     }
  814.     /**
  815.      * @param mixed $externalUrl
  816.      */
  817.     public function setExternalUrl($externalUrl): void
  818.     {
  819.         $this->externalUrl $externalUrl;
  820.     }
  821.     /**
  822.      * @return ArrayCollection
  823.      */
  824.     public function getMaintenances(): ArrayCollection
  825.     {
  826.         return $this->maintenances;
  827.     }
  828.     /**
  829.      * @param ArrayCollection $maintenances
  830.      */
  831.     public function setMaintenances(ArrayCollection $maintenances): void
  832.     {
  833.         $this->maintenances $maintenances;
  834.     }
  835.     /**
  836.      * @return mixed
  837.      */
  838.     public function getEco()
  839.     {
  840.         return $this->eco;
  841.     }
  842.     /**
  843.      * @param mixed $eco
  844.      */
  845.     public function setEco($eco): void
  846.     {
  847.         $this->eco $eco;
  848.     }
  849.     /**
  850.      * @return bool
  851.      */
  852.     public function isBookingDisabled()
  853.     {
  854.         return $this->bookingDisabled;
  855.     }
  856.     /**
  857.      * @param bool $bookingDisabled
  858.      */
  859.     public function setBookingDisabled($bookingDisabled): void
  860.     {
  861.         $this->bookingDisabled $bookingDisabled;
  862.     }
  863.     /**
  864.      * @return mixed
  865.      */
  866.     public function getBookingDateFrom()
  867.     {
  868.         return $this->bookingDateFrom;
  869.     }
  870.     /**
  871.      * @param mixed $bookingDateFrom
  872.      */
  873.     public function setBookingDateFrom($bookingDateFrom): void
  874.     {
  875.         $this->bookingDateFrom $bookingDateFrom;
  876.     }
  877. }