|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Resova\Objects; |
|
4
|
|
|
|
|
5
|
|
|
/** |
|
6
|
|
|
* The basket booking object |
|
7
|
|
|
* The booking object allows you to manage bookings for a basket. |
|
8
|
|
|
* |
|
9
|
|
|
* @codeCoverageIgnore |
|
10
|
|
|
* @package Resova\Models |
|
11
|
|
|
*/ |
|
12
|
|
|
class Booking |
|
13
|
|
|
{ |
|
14
|
|
|
/** |
|
15
|
|
|
* List of allowed fields |
|
16
|
|
|
* |
|
17
|
|
|
* @return array |
|
18
|
|
|
*/ |
|
19
|
|
|
public function allowed(): array |
|
20
|
|
|
{ |
|
21
|
|
|
return [ |
|
22
|
|
|
'id' => 'int', // The unique id for the booking object. |
|
23
|
|
|
'item' => 'object', // The item associated with the booking, an instance of the item object. |
|
24
|
|
|
'time' => 'object', // The time associated with the booking, an instance of the time object |
|
25
|
|
|
'booking_date' => 'string', // The date of the basket booking. |
|
26
|
|
|
'booking_time' => 'string', // The time of the basket booking. |
|
27
|
|
|
'booking_end' => 'string', // The end time of the basket booking. |
|
28
|
|
|
'duration' => 'int', // The duration of the basket booking. |
|
29
|
|
|
'total_quantity' => 'int', // The total quantity of spaces for the basket booking. |
|
30
|
|
|
'quantities' => 'array[Quantity]', // The quantities of item pricing categories for this basket booking. |
|
31
|
|
|
'extras' => 'array[Extra]', // The item extras for this basket booking. |
|
32
|
|
|
'price' => 'float', // The basket booking subtotal. |
|
33
|
|
|
'discount' => 'float', // The total discount value of the basket. |
|
34
|
|
|
'fee' => 'float', // The fee value of the basket. |
|
35
|
|
|
'tax' => 'float', // The tax value of the basket. |
|
36
|
|
|
'total' => 'float', // The total for the basket. |
|
37
|
|
|
'questions' => 'array[Question]', // The item booking questions for this basket booking. |
|
38
|
|
|
'participants' => 'array', // The participants for this basket booking. |
|
39
|
|
|
]; |
|
40
|
|
|
} |
|
41
|
|
|
} |
|
42
|
|
|
|