AppointmentsTable.php
1 year ago
CustomerBookingToEventsTicketsTable.php
2 years ago
CustomerBookingsTable.php
1 year ago
CustomerBookingsToEventsPeriodsTable.php
2 years ago
CustomerBookingsToExtrasTable.php
2 years ago
EventsPeriodsTable.php
1 year ago
EventsProvidersTable.php
2 years ago
EventsTable.php
1 year ago
EventsTagsTable.php
2 years ago
EventsTicketsTable.php
1 year ago
AppointmentsTable.php
53 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AmeliaBooking\Infrastructure\WP\InstallActions\DB\Booking; |
| 4 | |
| 5 | use AmeliaBooking\Domain\Common\Exceptions\InvalidArgumentException; |
| 6 | use AmeliaBooking\Domain\ValueObjects\String\Description; |
| 7 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\AbstractDatabaseTable; |
| 8 | |
| 9 | /** |
| 10 | * Class AppointmentsTable |
| 11 | * |
| 12 | * @package AmeliaBooking\Infrastructure\WP\InstallActions\DB\Booking |
| 13 | */ |
| 14 | class AppointmentsTable extends AbstractDatabaseTable |
| 15 | { |
| 16 | |
| 17 | const TABLE = 'appointments'; |
| 18 | |
| 19 | /** |
| 20 | * @return string |
| 21 | * @throws InvalidArgumentException |
| 22 | */ |
| 23 | public static function buildTable() |
| 24 | { |
| 25 | $table = self::getTableName(); |
| 26 | |
| 27 | $description = Description::MAX_LENGTH; |
| 28 | |
| 29 | return "CREATE TABLE {$table} ( |
| 30 | `id` INT(11) NOT NULL AUTO_INCREMENT, |
| 31 | `status` ENUM('approved', 'pending', 'canceled', 'rejected', 'no-show') NULL, |
| 32 | `bookingStart` DATETIME NOT NULL, |
| 33 | `bookingEnd` DATETIME NOT NULL, |
| 34 | `notifyParticipants` TINYINT(1) NOT NULL, |
| 35 | `serviceId` INT(11) NOT NULL, |
| 36 | `packageId` INT(11) DEFAULT NULL, |
| 37 | `providerId` INT(11) NOT NULL, |
| 38 | `locationId` INT(11) NULL, |
| 39 | `internalNotes` TEXT({$description}) NULL, |
| 40 | `googleCalendarEventId` VARCHAR(255) NULL, |
| 41 | `googleMeetUrl` VARCHAR(255) NULL, |
| 42 | `outlookCalendarEventId` VARCHAR(255) NULL, |
| 43 | `microsoftTeamsUrl` VARCHAR(255) NULL, |
| 44 | `appleCalendarEventId` VARCHAR(255) NULL, |
| 45 | `zoomMeeting` TEXT({$description}) NULL, |
| 46 | `lessonSpace` TEXT({$description}) NULL, |
| 47 | `parentId` INT(11) NULL, |
| 48 | `error` TEXT({$description}) DEFAULT NULL, |
| 49 | PRIMARY KEY (`id`) |
| 50 | ) DEFAULT CHARSET=utf8 COLLATE utf8_general_ci"; |
| 51 | } |
| 52 | } |
| 53 |