ameliabooking
/
src
/
Infrastructure
/
WP
/
InstallActions
/
DB
/
User
/
Provider
/
ProvidersLocationTable.php
ProvidersDayOffTable.php
2 months ago
ProvidersGoogleCalendarTable.php
2 months ago
ProvidersLocationTable.php
2 months ago
ProvidersOutlookCalendarTable.php
2 months ago
ProvidersPeriodLocationTable.php
2 months ago
ProvidersPeriodServiceTable.php
2 months ago
ProvidersPeriodTable.php
2 months ago
ProvidersServiceTable.php
2 months ago
ProvidersSpecialDayPeriodLocationTable.php
2 months ago
ProvidersSpecialDayPeriodServiceTable.php
2 months ago
ProvidersSpecialDayPeriodTable.php
2 months ago
ProvidersSpecialDayTable.php
2 months ago
ProvidersTimeOutTable.php
2 months ago
ProvidersViewsTable.php
2 months ago
ProvidersWeekDayTable.php
2 months ago
ProvidersLocationTable.php
36 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 ProvidersLocationTable |
| 10 | * |
| 11 | * @package AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider |
| 12 | */ |
| 13 | class ProvidersLocationTable extends AbstractDatabaseTable |
| 14 | { |
| 15 | public const TABLE = 'providers_to_locations'; |
| 16 | |
| 17 | /** |
| 18 | * @return string |
| 19 | * @throws InvalidArgumentException |
| 20 | */ |
| 21 | public static function buildTable() |
| 22 | { |
| 23 | $table = self::getTableName(); |
| 24 | |
| 25 | $charsetCollate = self::getCharsetCollate(); |
| 26 | |
| 27 | return "CREATE TABLE {$table} ( |
| 28 | `id` int(11) NOT NULL AUTO_INCREMENT, |
| 29 | `userId` int(11) NOT NULL, |
| 30 | `locationId` int(11) NOT NULL, |
| 31 | PRIMARY KEY (`id`), |
| 32 | UNIQUE KEY `id` (`id`) |
| 33 | ) {$charsetCollate};"; |
| 34 | } |
| 35 | } |
| 36 |