CustomerBookingEventPeriod.php
7 years ago
CustomerBookingEventTicket.php
4 years ago
Event.php
2 years ago
EventPeriod.php
4 years ago
EventTag.php
7 years ago
EventTicket.php
1 year ago
CustomerBookingEventTicket.php
129 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @copyright © TMS-Plugins. All rights reserved. |
| 4 | * @licence See LICENCE.md for license details. |
| 5 | */ |
| 6 | |
| 7 | namespace AmeliaBooking\Domain\Entity\Booking\Event; |
| 8 | |
| 9 | use AmeliaBooking\Domain\ValueObjects\Number\Float\Price; |
| 10 | use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; |
| 11 | use AmeliaBooking\Domain\ValueObjects\Number\Integer\IntegerValue; |
| 12 | |
| 13 | /** |
| 14 | * Class CustomerBookingEventTicket |
| 15 | * |
| 16 | * @package AmeliaBooking\Domain\Entity\Booking\Event |
| 17 | */ |
| 18 | class CustomerBookingEventTicket |
| 19 | { |
| 20 | /** @var Id */ |
| 21 | private $id; |
| 22 | |
| 23 | /** @var Id */ |
| 24 | private $customerBookingId; |
| 25 | |
| 26 | /** @var Id */ |
| 27 | protected $eventTicketId; |
| 28 | |
| 29 | /** @var IntegerValue */ |
| 30 | protected $persons; |
| 31 | |
| 32 | /** @var Price */ |
| 33 | protected $price; |
| 34 | |
| 35 | /** |
| 36 | * @return Id |
| 37 | */ |
| 38 | public function getId() |
| 39 | { |
| 40 | return $this->id; |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * @param Id $id |
| 45 | */ |
| 46 | public function setId($id) |
| 47 | { |
| 48 | $this->id = $id; |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * @return Id |
| 53 | */ |
| 54 | public function getCustomerBookingId() |
| 55 | { |
| 56 | return $this->customerBookingId; |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * @param Id $customerBookingId |
| 61 | */ |
| 62 | public function setCustomerBookingId(Id $customerBookingId) |
| 63 | { |
| 64 | $this->customerBookingId = $customerBookingId; |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * @return Id |
| 69 | */ |
| 70 | public function getEventTicketId() |
| 71 | { |
| 72 | return $this->eventTicketId; |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * @param Id $eventTicketId |
| 77 | */ |
| 78 | public function setEventTicketId(Id $eventTicketId) |
| 79 | { |
| 80 | $this->eventTicketId = $eventTicketId; |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * @return IntegerValue |
| 85 | */ |
| 86 | public function getPersons() |
| 87 | { |
| 88 | return $this->persons; |
| 89 | } |
| 90 | |
| 91 | /** |
| 92 | * @param IntegerValue $persons |
| 93 | */ |
| 94 | public function setPersons(IntegerValue $persons) |
| 95 | { |
| 96 | $this->persons = $persons; |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * @return Price |
| 101 | */ |
| 102 | public function getPrice() |
| 103 | { |
| 104 | return $this->price; |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * @param Price $price |
| 109 | */ |
| 110 | public function setPrice(Price $price) |
| 111 | { |
| 112 | $this->price = $price; |
| 113 | } |
| 114 | |
| 115 | /** |
| 116 | * @return array |
| 117 | */ |
| 118 | public function toArray() |
| 119 | { |
| 120 | return [ |
| 121 | 'id' => $this->getId() ? $this->getId()->getValue() : null, |
| 122 | 'eventTicketId' => $this->getEventTicketId() ? $this->getEventTicketId()->getValue() : null, |
| 123 | 'customerBookingId' => $this->getCustomerBookingId() ? $this->getCustomerBookingId()->getValue() : null, |
| 124 | 'persons' => $this->getPersons() ? $this->getPersons()->getValue() : null, |
| 125 | 'price' => $this->getPrice() ? $this->getPrice()->getValue() : null |
| 126 | ]; |
| 127 | } |
| 128 | } |
| 129 |