PluginProbe
Bookit — Booking & Appointment Calendar / 2.6.0.5
Bookit — Booking & Appointment Calendar v2.6.0.5
2.6.0.5 2.6.0.4 2.6.0.3 2.6.0.2 2.6.0.1 2.6.0 trunk 1.2 1.2.2 1.2.3 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 All 62 releases
bookit / includes / classes / database / Staff_Working_Hours.php

Staff_Working_Hours.php in Bookit — Booking & Appointment Calendar 2.6.0.5, at includes/classes/database/Staff_Working_Hours.php

33 lines 725 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Bookit\Classes\Database;
4
5 use Bookit\Classes\Vendor\DatabaseModel;
6
7 class Staff_Working_Hours extends DatabaseModel {
8
9 /**
10 * Create Table
11 */
12 public static function create_table() {
13 global $wpdb;
14 require_once ABSPATH . 'wp-admin/includes/upgrade.php';
15 $table_name = self::_table();
16 $primary_key = self::$primary_key;
17
18 $sql = "CREATE TABLE {$table_name} (
19 id INT UNSIGNED NOT NULL AUTO_INCREMENT,
20 staff_id INT UNSIGNED NOT NULL,
21 weekday INT,
22 start_time TIME,
23 end_time TIME,
24 break_from TIME,
25 break_to TIME,
26 PRIMARY KEY ({$primary_key}),
27 INDEX `idx_staff_id` (`staff_id`)
28 ) {$wpdb->get_charset_collate()};";
29
30 maybe_create_table( $table_name, $sql );
31 }
32 }
33