PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.20
Booking for Appointments and Events Calendar – Amelia v1.2.20
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 / Infrastructure / WP / InstallActions / DB / Payment / PaymentsTable.php
ameliabooking / src / Infrastructure / WP / InstallActions / DB / Payment Last commit date
PaymentsTable.php 1 year ago
PaymentsTable.php
65 lines
1 <?php
2 /**
3 * @copyright © TMS-Plugins. All rights reserved.
4 * @licence See LICENCE.md for license details.
5 */
6
7 namespace AmeliaBooking\Infrastructure\WP\InstallActions\DB\Payment;
8
9 use AmeliaBooking\Domain\Common\Exceptions\InvalidArgumentException;
10 use AmeliaBooking\Infrastructure\WP\InstallActions\DB\AbstractDatabaseTable;
11
12 /**
13 * Class PaymentsTable
14 *
15 * @package AmeliaBooking\Infrastructure\WP\InstallActions\DB\Payment
16 */
17 class PaymentsTable extends AbstractDatabaseTable
18 {
19
20 const TABLE = 'payments';
21
22 /**
23 * @return string
24 * @throws InvalidArgumentException
25 */
26 public static function buildTable()
27 {
28 $table = self::getTableName();
29
30 return "CREATE TABLE {$table} (
31 `id` int(11) NOT NULL AUTO_INCREMENT,
32 `customerBookingId` int(11) NULL,
33 `amount` DOUBLE NOT NULL default 0,
34 `dateTime` datetime NULL,
35 `status` ENUM('paid', 'pending', 'partiallyPaid', 'refunded') NOT NULL,
36 `gateway` ENUM('onSite', 'payPal', 'stripe', 'wc', 'mollie', 'razorpay', 'square') NOT NULL,
37 `gatewayTitle` varchar(255) NULL,
38 `data` text NULL,
39 `packageCustomerId` int(11) NULL,
40 `parentId` int(11) DEFAULT NULL,
41 `entity` ENUM('appointment', 'event', 'package') NULL,
42 `created` DATETIME NULL,
43 `actionsCompleted` TINYINT(1) NULL,
44 `triggeredActions` TINYINT(1) NULL,
45 `wcOrderId` bigint(20) NULL,
46 `wcOrderItemId` bigint(20) NULL,
47 `transactionId` varchar(255) NULL,
48 `transfers` text NULL,
49 `invoiceNumber` int(11) NULL,
50 PRIMARY KEY (`id`)
51 ) DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
52 }
53
54 /**
55 * @return array
56 * @throws InvalidArgumentException
57 */
58 public static function alterTable()
59 {
60 $table = self::getTableName();
61
62 return ["ALTER TABLE {$table} MODIFY customerBookingId INT(11) NULL"];
63 }
64 }
65