ameliabooking
/
src
/
Infrastructure
/
WP
/
InstallActions
/
DB
/
Coupon
/
CouponsToPackagesTable.php
CouponsTable.php
1 year ago
CouponsToEventsTable.php
5 years ago
CouponsToPackagesTable.php
3 years ago
CouponsToServicesTable.php
5 years ago
CouponsToPackagesTable.php
38 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\Coupon; |
| 8 | |
| 9 | use AmeliaBooking\Domain\Common\Exceptions\InvalidArgumentException; |
| 10 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\AbstractDatabaseTable; |
| 11 | |
| 12 | /** |
| 13 | * Class CouponsToPackagesTable |
| 14 | * |
| 15 | * @package AmeliaBooking\Infrastructure\WP\InstallActions\DB\Coupon |
| 16 | */ |
| 17 | class CouponsToPackagesTable extends AbstractDatabaseTable |
| 18 | { |
| 19 | |
| 20 | const TABLE = 'coupons_to_packages'; |
| 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 | `couponId` int(11) NOT NULL, |
| 33 | `packageId` int(11) NOT NULL, |
| 34 | PRIMARY KEY (`id`) |
| 35 | ) DEFAULT CHARSET=utf8 COLLATE utf8_general_ci"; |
| 36 | } |
| 37 | } |
| 38 |