Category.php
1 year ago
Extra.php
1 year ago
Package.php
6 months ago
PackageCustomer.php
6 months ago
PackageCustomerService.php
6 months ago
PackageService.php
6 months ago
Resource.php
6 months ago
Service.php
6 months ago
PackageCustomerService.php
149 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @copyright © Melograno Ventures. All rights reserved. |
| 5 | * @licence See LICENCE.md for license details. |
| 6 | */ |
| 7 | |
| 8 | namespace AmeliaBooking\Domain\Entity\Bookable\Service; |
| 9 | |
| 10 | use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; |
| 11 | use AmeliaBooking\Domain\ValueObjects\Number\Integer\WholeNumber; |
| 12 | |
| 13 | /** |
| 14 | * Class PackageCustomerService |
| 15 | * |
| 16 | * @package AmeliaBooking\Domain\Entity\Bookable\Service |
| 17 | */ |
| 18 | class PackageCustomerService |
| 19 | { |
| 20 | /** @var Id */ |
| 21 | private $id; |
| 22 | |
| 23 | /** @var PackageCustomer */ |
| 24 | private $packageCustomer; |
| 25 | |
| 26 | /** @var Id */ |
| 27 | private $serviceId; |
| 28 | |
| 29 | /** @var Id */ |
| 30 | private $providerId; |
| 31 | |
| 32 | /** @var Id */ |
| 33 | private $locationId; |
| 34 | |
| 35 | /** @var WholeNumber */ |
| 36 | private $bookingsCount; |
| 37 | |
| 38 | /** |
| 39 | * @return Id |
| 40 | */ |
| 41 | public function getId() |
| 42 | { |
| 43 | return $this->id; |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * @param Id $id |
| 48 | */ |
| 49 | public function setId(Id $id) |
| 50 | { |
| 51 | $this->id = $id; |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * @return Id |
| 56 | */ |
| 57 | public function getServiceId() |
| 58 | { |
| 59 | return $this->serviceId; |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * @param Id $serviceId |
| 64 | */ |
| 65 | public function setServiceId(Id $serviceId) |
| 66 | { |
| 67 | $this->serviceId = $serviceId; |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * @return Id |
| 72 | */ |
| 73 | public function getProviderId() |
| 74 | { |
| 75 | return $this->providerId; |
| 76 | } |
| 77 | |
| 78 | /** |
| 79 | * @param Id $providerId |
| 80 | */ |
| 81 | public function setProviderId(Id $providerId) |
| 82 | { |
| 83 | $this->providerId = $providerId; |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * @return Id |
| 88 | */ |
| 89 | public function getLocationId() |
| 90 | { |
| 91 | return $this->locationId; |
| 92 | } |
| 93 | |
| 94 | /** |
| 95 | * @param Id $locationId |
| 96 | */ |
| 97 | public function setLocationId(Id $locationId) |
| 98 | { |
| 99 | $this->locationId = $locationId; |
| 100 | } |
| 101 | |
| 102 | /** |
| 103 | * @return WholeNumber |
| 104 | */ |
| 105 | public function getBookingsCount() |
| 106 | { |
| 107 | return $this->bookingsCount; |
| 108 | } |
| 109 | |
| 110 | /** |
| 111 | * @param WholeNumber $bookingsCount |
| 112 | */ |
| 113 | public function setBookingsCount(WholeNumber $bookingsCount) |
| 114 | { |
| 115 | $this->bookingsCount = $bookingsCount; |
| 116 | } |
| 117 | |
| 118 | /** |
| 119 | * @return PackageCustomer |
| 120 | */ |
| 121 | public function getPackageCustomer() |
| 122 | { |
| 123 | return $this->packageCustomer; |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * @param PackageCustomer $packageCustomer |
| 128 | */ |
| 129 | public function setPackageCustomer(PackageCustomer $packageCustomer) |
| 130 | { |
| 131 | $this->packageCustomer = $packageCustomer; |
| 132 | } |
| 133 | |
| 134 | /** |
| 135 | * @return array |
| 136 | */ |
| 137 | public function toArray() |
| 138 | { |
| 139 | return [ |
| 140 | 'id' => $this->getId() ? $this->getId()->getValue() : null, |
| 141 | 'serviceId' => $this->getServiceId() ? $this->getServiceId()->getValue() : null, |
| 142 | 'providerId' => $this->getProviderId() ? $this->getProviderId()->getValue() : null, |
| 143 | 'locationId' => $this->getLocationId() ? $this->getLocationId()->getValue() : null, |
| 144 | 'bookingsCount' => $this->getBookingsCount() ? $this->getBookingsCount()->getValue() : null, |
| 145 | 'packageCustomer' => $this->getPackageCustomer() ? $this->getPackageCustomer()->toArray() : null, |
| 146 | ]; |
| 147 | } |
| 148 | } |
| 149 |