ameliabooking
/
src
/
Infrastructure
/
WP
/
InstallActions
/
DB
/
User
/
Provider
/
ProvidersPeriodServiceTable.php
ProvidersDayOffTable.php
5 years ago
ProvidersGoogleCalendarTable.php
5 years ago
ProvidersLocationTable.php
5 years ago
ProvidersOutlookCalendarTable.php
5 years ago
ProvidersPeriodLocationTable.php
3 years ago
ProvidersPeriodServiceTable.php
5 years ago
ProvidersPeriodTable.php
5 years ago
ProvidersServiceTable.php
3 years ago
ProvidersSpecialDayPeriodLocationTable.php
3 years ago
ProvidersSpecialDayPeriodServiceTable.php
3 years ago
ProvidersSpecialDayPeriodTable.php
5 years ago
ProvidersSpecialDayTable.php
5 years ago
ProvidersTimeOutTable.php
5 years ago
ProvidersViewsTable.php
5 years ago
ProvidersWeekDayTable.php
5 years ago
ProvidersPeriodServiceTable.php
35 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider; |
| 4 | |
| 5 | use AmeliaBooking\Domain\Common\Exceptions\InvalidArgumentException; |
| 6 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\AbstractDatabaseTable; |
| 7 | |
| 8 | /** |
| 9 | * Class ProvidersPeriodServiceTable |
| 10 | * |
| 11 | * @package AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider |
| 12 | */ |
| 13 | class ProvidersPeriodServiceTable extends AbstractDatabaseTable |
| 14 | { |
| 15 | |
| 16 | const TABLE = 'providers_to_periods_services'; |
| 17 | |
| 18 | /** |
| 19 | * @return string |
| 20 | * @throws InvalidArgumentException |
| 21 | */ |
| 22 | public static function buildTable() |
| 23 | { |
| 24 | $table = self::getTableName(); |
| 25 | |
| 26 | return "CREATE TABLE {$table} ( |
| 27 | `id` int(11) NOT NULL AUTO_INCREMENT, |
| 28 | `periodId` int(11) NOT NULL, |
| 29 | `serviceId` int(11) NOT NULL, |
| 30 | PRIMARY KEY (`id`), |
| 31 | UNIQUE KEY `id` (`id`) |
| 32 | ) DEFAULT CHARSET=utf8 COLLATE utf8_general_ci"; |
| 33 | } |
| 34 | } |
| 35 |