-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `sports_academy`
--

-- --------------------------------------------------------

--
-- Table structure for table `activity_log`
--

CREATE TABLE `activity_log` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `log_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `subject_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `event` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `subject_id` bigint(20) UNSIGNED DEFAULT NULL,
  `causer_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `causer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `properties` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`properties`)),
  `batch_uuid` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- Table structure for table `booking`
--

CREATE TABLE `booking` (
  `id` int(11) NOT NULL,
  `venue_id` int(11) NOT NULL,
  `slot_ids` int(11) NOT NULL,
  `court_id` int(11) NOT NULL,
  `date` timestamp NOT NULL DEFAULT current_timestamp(),
  `customer_id` int(11) NOT NULL,
  `price` varchar(20) NOT NULL,
  `created_at` int(11) NOT NULL DEFAULT current_timestamp(),
  `updated_at` int(11) NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `category`
--

CREATE TABLE `category` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `image` varchar(100) NOT NULL,
  `slug` varchar(100) NOT NULL,
  `sort` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `category`
--

INSERT INTO `category` (`id`, `name`, `image`, `slug`, `sort`, `created_at`, `updated_at`) VALUES
(1, 'Indoor', 'admin/assets/media/no_img.png', '0', 0, '2022-08-25 10:08:32', '2022-08-25 10:08:32'),
(2, 'Outdoor', 'admin/assets/media/no_img.png', '0', 0, '2022-08-25 10:08:32', '2022-08-25 10:08:32'),
(4, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:17', '2022-08-25 11:12:17'),
(5, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:28', '2022-08-25 11:12:28'),
(6, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(7, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(8, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(9, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(10, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(11, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(12, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(13, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(14, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(15, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(16, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(17, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(18, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(19, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(20, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(21, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(22, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(23, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(24, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(25, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(26, 'Testing', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(27, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(28, 'gsdgdsg', '', '', 0, '2022-08-25 11:12:29', '2022-08-25 11:12:29'),
(29, 'sad', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\/images/1662209568.jpg', 'sad', NULL, '2022-09-03 07:22:48', '2022-09-03 07:22:48'),
(30, 'sad', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\/images/1662210220.jpg', 'sad-2', NULL, '2022-09-03 07:33:40', '2022-09-03 07:33:40'),
(31, 'sad', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662210607.jpg', 'sad-3', NULL, '2022-09-03 07:40:07', '2022-09-03 07:40:07'),
(32, 'Vignesh', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662211607.png', 'vignesh', NULL, '2022-09-03 07:56:47', '2022-09-03 07:56:47'),
(33, 'ASDFG', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662211665.png', 'asdfg', NULL, '2022-09-03 07:57:45', '2022-09-03 07:57:45'),
(34, 'ewerew', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662211716.png', 'ewerew', NULL, '2022-09-03 07:58:36', '2022-09-03 07:58:36'),
(35, 'QWERT', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662211915.png', 'qwert', NULL, '2022-09-03 08:01:55', '2022-09-03 08:01:55'),
(36, 'asffafa', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662211988.png', 'asffafa', NULL, '2022-09-03 08:03:08', '2022-09-03 08:03:08'),
(37, 'Vigneshwaran', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662212349.png', 'vigneshwaran', NULL, '2022-09-03 08:09:09', '2022-09-03 08:09:09'),
(38, 'ASDFG', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662212561.png', 'asdfg-2', NULL, '2022-09-03 08:12:41', '2022-09-03 08:12:41'),
(39, 'ASDFHH', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662212615.png', 'asdfhh', NULL, '2022-09-03 08:13:35', '2022-09-03 08:13:35'),
(40, 'fddf', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662213006.png', 'fddf', NULL, '2022-09-03 08:20:06', '2022-09-03 08:20:06'),
(41, 'dsdfds', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662213071.png', 'dsdfds', NULL, '2022-09-03 08:21:11', '2022-09-03 08:21:11'),
(42, 'ASDFGGG', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662213149.png', 'asdfggg', NULL, '2022-09-03 08:22:29', '2022-09-03 08:22:29'),
(43, 'zxvxzvzx', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662213269.png', 'zxvxzvzx', NULL, '2022-09-03 08:24:29', '2022-09-03 08:24:29'),
(44, 'ASSDDD', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662213440.jpg', 'assddd', NULL, '2022-09-03 08:27:21', '2022-09-03 08:27:21'),
(45, 'fddsfsd', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662213821.png', 'fddsfsd', NULL, '2022-09-03 08:33:41', '2022-09-03 08:33:41'),
(46, 'ADAd', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662213885.png', 'adad', NULL, '2022-09-03 08:34:45', '2022-09-03 08:34:45'),
(47, 'rttwet', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662213920.png', 'rttwet', NULL, '2022-09-03 08:35:20', '2022-09-03 08:35:20'),
(48, 'Vigneshwaran', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662214072.jpg', 'vigneshwaran-2', NULL, '2022-09-03 08:37:53', '2022-09-03 08:37:53'),
(49, 'HELO MOTA TWETING', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662214326.jpg', 'helo-mota-tweting', NULL, '2022-09-03 08:42:06', '2022-09-03 08:42:06'),
(50, 'HELO MOTA TWETING', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662214328.jpg', 'helo-mota-tweting-2', NULL, '2022-09-03 08:42:08', '2022-09-03 08:42:08'),
(51, 'HELO MOTA TWETING', 'C:\\xampp\\htdocs\\sports-acadamy\\public\\category/images/1662214330.jpg', 'helo-mota-tweting-3', NULL, '2022-09-03 08:42:10', '2022-09-03 08:42:10');

-- --------------------------------------------------------

--
-- Table structure for table `common_slots`
--

CREATE TABLE `common_slots` (
  `id` int(11) NOT NULL,
  `day_id` int(11) NOT NULL,
  `start_time` int(11) NOT NULL,
  `end_time` int(11) NOT NULL,
  `slot_break_time` int(11) NOT NULL,
  `slot_length` int(11) NOT NULL,
  `price_per_slot` int(11) NOT NULL,
  `day_off` tinyint(1) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `court`
--

CREATE TABLE `court` (
  `id` int(11) NOT NULL,
  `court_name` varchar(100) NOT NULL,
  `slot_id` int(11) NOT NULL,
  `category_id` int(11) NOT NULL,
  `sports_id` int(11) NOT NULL,
  `venue_id` int(11) NOT NULL,
  `status` enum('Active','Inactive') NOT NULL,
  `slug` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `days`
--

CREATE TABLE `days` (
  `id` int(11) NOT NULL,
  `name` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `days`
--

INSERT INTO `days` (`id`, `name`) VALUES
(1, 'Monday'),
(2, 'Tuesday'),
(3, 'Wednesday '),
(4, 'Thursday '),
(5, 'Friday  '),
(6, 'Saturday  '),
(7, 'Sunday');

-- --------------------------------------------------------

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(5, '2022_08_22_125741_create_permission_tables', 1),
(6, '2021_04_14_044507_create_settings_table', 2),
(7, '2021_06_15_022916_create_user_infos_table', 2),
(8, '2021_06_23_041411_create_activity_log_table', 2),
(9, '2021_06_23_041412_add_event_column_to_activity_log_table', 2),
(10, '2021_06_23_041413_add_batch_uuid_column_to_activity_log_table', 2),
(11, '2021_11_04_200820_add_api_token_column', 2);

-- --------------------------------------------------------

--
-- Table structure for table `model_has_permissions`
--

CREATE TABLE `model_has_permissions` (
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `model_has_roles`
--

CREATE TABLE `model_has_roles` (
  `role_id` bigint(20) UNSIGNED NOT NULL,
  `model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `model_has_roles`
--

INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES
(1, 'App\\Models\\User', 1),
(2, 'App\\Models\\User', 2);

-- --------------------------------------------------------

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `permissions`
--

INSERT INTO `permissions` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
(1, 'role-list', 'web', '2022-08-22 08:01:09', '2022-08-22 08:01:09'),
(2, 'role-create', 'web', '2022-08-22 08:01:09', '2022-08-22 08:01:09'),
(3, 'role-edit', 'web', '2022-08-22 08:01:09', '2022-08-22 08:01:09'),
(4, 'role-delete', 'web', '2022-08-22 08:01:09', '2022-08-22 08:01:09'),
(5, 'product-list', 'web', '2022-08-22 08:01:09', '2022-08-22 08:01:09'),
(6, 'product-create', 'web', '2022-08-22 08:01:09', '2022-08-22 08:01:09'),
(7, 'product-edit', 'web', '2022-08-22 08:01:09', '2022-08-22 08:01:09'),
(8, 'product-delete', 'web', '2022-08-22 08:01:09', '2022-08-22 08:01:09');

-- --------------------------------------------------------

--
-- Table structure for table `player_type`
--

CREATE TABLE `player_type` (
  `id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `player_type`
--

INSERT INTO `player_type` (`id`, `name`) VALUES
(1, 'individual'),
(2, 'corporate'),
(3, 'student');

-- --------------------------------------------------------

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
(1, 'admin', 'web', '2022-08-22 08:00:55', '2022-08-22 08:00:55'),
(2, 'user', 'web', '2022-08-22 08:00:55', '2022-08-22 08:00:55');

-- --------------------------------------------------------

--
-- Table structure for table `role_has_permissions`
--

CREATE TABLE `role_has_permissions` (
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `role_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `role_has_permissions`
--

INSERT INTO `role_has_permissions` (`permission_id`, `role_id`) VALUES
(1, 1),
(1, 2),
(2, 1),
(2, 2),
(3, 1),
(3, 2),
(4, 1),
(4, 2),
(5, 1),
(5, 2),
(6, 1),
(6, 2),
(7, 1),
(7, 2),
(8, 1),
(8, 2);

-- --------------------------------------------------------

--
-- Table structure for table `setting`
--

CREATE TABLE `setting` (
  `id` int(11) NOT NULL,
  `type` varchar(50) NOT NULL,
  `value` longtext NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `slots`
--

CREATE TABLE `slots` (
  `id` int(11) NOT NULL,
  `day_id` int(11) NOT NULL,
  `start_time` int(11) NOT NULL,
  `end_time` int(11) NOT NULL,
  `slot_break_time` int(11) NOT NULL,
  `slot_length` int(11) NOT NULL,
  `price_per_slot` int(11) NOT NULL,
  `time_off` int(11) NOT NULL,
  `venue_id` int(11) NOT NULL,
  `court_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `sports`
--

CREATE TABLE `sports` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `image` varchar(100) NOT NULL,
  `category` int(11) NOT NULL,
  `sort` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `user_infos`
--

CREATE TABLE `user_infos` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `avatar` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `company` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `website` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `language` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `timezone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `communication` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `marketing` tinyint(4) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- Table structure for table `venues`
--

CREATE TABLE `venues` (
  `name` varchar(255) NOT NULL,
  `sports_category` int(11) NOT NULL,
  `sports` int(11) NOT NULL,
  `sort` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `activity_log`
--
ALTER TABLE `activity_log`
  ADD PRIMARY KEY (`id`),
  ADD KEY `subject` (`subject_type`,`subject_id`),
  ADD KEY `causer` (`causer_type`,`causer_id`),
  ADD KEY `activity_log_log_name_index` (`log_name`);

--
-- Indexes for table `booking`
--
ALTER TABLE `booking`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `category`
--
ALTER TABLE `category`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `common_slots`
--
ALTER TABLE `common_slots`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `court`
--
ALTER TABLE `court`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `days`
--
ALTER TABLE `days`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  ADD KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`);

--
-- Indexes for table `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  ADD KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`);

--
-- Indexes for table `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `permissions_name_guard_name_unique` (`name`,`guard_name`);

--
-- Indexes for table `player_type`
--
ALTER TABLE `player_type`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `roles_name_guard_name_unique` (`name`,`guard_name`);

--
-- Indexes for table `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`role_id`),
  ADD KEY `role_has_permissions_role_id_foreign` (`role_id`);

--
-- Indexes for table `setting`
--
ALTER TABLE `setting`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `slots`
--
ALTER TABLE `slots`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sports`
--
ALTER TABLE `sports`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `user_infos`
--
ALTER TABLE `user_infos`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `activity_log`
--
ALTER TABLE `activity_log`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `booking`
--
ALTER TABLE `booking`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `category`
--
ALTER TABLE `category`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=52;

--
-- AUTO_INCREMENT for table `common_slots`
--
ALTER TABLE `common_slots`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `court`
--
ALTER TABLE `court`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `days`
--
ALTER TABLE `days`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `player_type`
--
ALTER TABLE `player_type`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `setting`
--
ALTER TABLE `setting`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `slots`
--
ALTER TABLE `slots`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sports`
--
ALTER TABLE `sports`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `user_infos`
--
ALTER TABLE `user_infos`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;
COMMIT;

