PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.11
Booking for Appointments and Events Calendar – Amelia v1.2.11
2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / src / Domain / Entity / Booking / Event / EventTicket.php
ameliabooking / src / Domain / Entity / Booking / Event Last commit date
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
EventTicket.php
273 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\BooleanValueObject;
10 use AmeliaBooking\Domain\ValueObjects\Json;
11 use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id;
12 use AmeliaBooking\Domain\ValueObjects\Number\Integer\IntegerValue;
13 use AmeliaBooking\Domain\ValueObjects\String\Name;
14 use AmeliaBooking\Domain\ValueObjects\Number\Float\Price;
15
16 /**
17 * Class EventTicket
18 *
19 * @package AmeliaBooking\Domain\Entity\Booking\Event
20 */
21 class EventTicket
22 {
23 /** @var Id */
24 private $id;
25
26 /** @var Id */
27 private $eventId;
28
29 /** @var Name */
30 protected $name;
31
32 /** @var BooleanValueObject */
33 private $enabled;
34
35 /** @var Price */
36 protected $price;
37
38 /** @var Price */
39 protected $dateRangePrice;
40
41 /** @var IntegerValue */
42 private $spots;
43
44 /** @var IntegerValue */
45 private $waiting;
46
47 /** @var IntegerValue */
48 private $waitingListSpots;
49
50 /** @var Json */
51 protected $dateRanges;
52
53 /** @var IntegerValue */
54 private $sold;
55
56 /** @var Json */
57 protected $translations;
58
59 /**
60 * @return Json
61 */
62 public function getDateRanges()
63 {
64 return $this->dateRanges;
65 }
66
67 /**
68 * @param Json $dateRanges
69 */
70 public function setDateRanges($dateRanges)
71 {
72 $this->dateRanges = $dateRanges;
73 }
74
75 /**
76 * @return IntegerValue
77 */
78 public function getSpots()
79 {
80 return $this->spots;
81 }
82
83 /**
84 * @param IntegerValue $spots
85 */
86 public function setSpots($spots)
87 {
88 $this->spots = $spots;
89 }
90
91 /**
92 * @return IntegerValue
93 */
94 public function getWaitingListSpots()
95 {
96 return $this->waitingListSpots;
97 }
98
99 /**
100 * @param IntegerValue $waitingListSpots
101 */
102 public function setWaitingListSpots($waitingListSpots)
103 {
104 $this->waitingListSpots = $waitingListSpots;
105 }
106
107 /**
108 * @return Price
109 */
110 public function getPrice()
111 {
112 return $this->price;
113 }
114
115 /**
116 * @param Price $price
117 */
118 public function setPrice($price)
119 {
120 $this->price = $price;
121 }
122
123 /**
124 * @return Price
125 */
126 public function getDateRangePrice()
127 {
128 return $this->dateRangePrice;
129 }
130
131 /**
132 * @param Price $dateRangePrice
133 */
134 public function setDateRangePrice($dateRangePrice)
135 {
136 $this->dateRangePrice = $dateRangePrice;
137 }
138
139 /**
140 * @return Name
141 */
142 public function getName()
143 {
144 return $this->name;
145 }
146
147 /**
148 * @param Name $name
149 */
150 public function setName($name)
151 {
152 $this->name = $name;
153 }
154
155 /**
156 * @return BooleanValueObject
157 */
158 public function getEnabled()
159 {
160 return $this->enabled;
161 }
162
163 /**
164 * @param BooleanValueObject $enabled
165 */
166 public function setEnabled($enabled)
167 {
168 $this->enabled = $enabled;
169 }
170
171 /**
172 * @return Id
173 */
174 public function getEventId()
175 {
176 return $this->eventId;
177 }
178
179 /**
180 * @param Id $eventId
181 */
182 public function setEventId($eventId)
183 {
184 $this->eventId = $eventId;
185 }
186
187 /**
188 * @return Id
189 */
190 public function getId()
191 {
192 return $this->id;
193 }
194
195 /**
196 * @param Id $id
197 */
198 public function setId($id)
199 {
200 $this->id = $id;
201 }
202
203 /**
204 * @return IntegerValue
205 */
206 public function getSold()
207 {
208 return $this->sold;
209 }
210
211 /**
212 * @param IntegerValue $sold
213 */
214 public function setSold($sold)
215 {
216 $this->sold = $sold;
217 }
218
219 /**
220 * @return IntegerValue
221 */
222 public function getWaiting()
223 {
224 return $this->waiting;
225 }
226
227 /**
228 * @param IntegerValue $waiting
229 */
230 public function setWaiting($waiting)
231 {
232 $this->waiting = $waiting;
233 }
234
235 /**
236 * @return Json
237 */
238 public function getTranslations()
239 {
240 return $this->translations;
241 }
242
243 /**
244 * @param Json $translations
245 */
246 public function setTranslations(Json $translations)
247 {
248 $this->translations = $translations;
249 }
250
251
252 /**
253 * @return array
254 */
255 public function toArray()
256 {
257 return [
258 'id' => $this->getId() ? $this->getId()->getValue() : null,
259 'eventId' => $this->getEventId() ? $this->getEventId()->getValue() : null,
260 'name' => $this->getName() ? $this->getName()->getValue() : null,
261 'enabled' => $this->getEnabled() ? $this->getEnabled()->getValue() : null,
262 'price' => $this->getPrice() ? $this->getPrice()->getValue() : null,
263 'dateRangePrice' => $this->getDateRangePrice() ? $this->getDateRangePrice()->getValue() : null,
264 'spots' => $this->getSpots() ? $this->getSpots()->getValue() : null,
265 'waitingListSpots' => $this->getWaitingListSpots() ? $this->getWaitingListSpots()->getValue() : null,
266 'dateRanges' => $this->getDateRanges() ? $this->getDateRanges()->getValue() : null,
267 'sold' => $this->getSold() ? $this->getSold()->getValue() : 0,
268 'waiting' => $this->getWaiting() ? $this->getWaiting()->getValue() : 0,
269 'translations' => $this->getTranslations() ? $this->getTranslations()->getValue() : null,
270 ];
271 }
272 }
273