-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 13-11-2023 a las 06:02:00
-- Versión del servidor: 10.5.20-MariaDB-cll-lve-log
-- Versión de PHP: 7.4.27

START TRANSACTION;



--
-- Base de datos: `themskxg_parkbyplate`
--

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

--
-- Estructura de tabla para la tabla `communities`
--

CREATE TABLE `communities` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(11) NOT NULL,
  `type` varchar(191) DEFAULT NULL,
  `community_name` varchar(191) DEFAULT NULL,
  `management_company` varchar(191) DEFAULT NULL,
  `location` varchar(191) DEFAULT NULL,
  `contact_person` varchar(191) DEFAULT NULL,
  `email` varchar(191) DEFAULT NULL,
  `resident_spaces` varchar(191) DEFAULT NULL,
  `number_of_visitor_spaces` varchar(191) DEFAULT NULL,
  `bank_account_number` varchar(191) DEFAULT NULL,
  `routing_number` varchar(191) DEFAULT NULL,
  `lat` varchar(191) DEFAULT NULL,
  `lang` varchar(191) DEFAULT NULL,
  `status` tinyint(4) NOT NULL DEFAULT 1,
  `price_name` varchar(191) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `communities`
--

INSERT INTO `communities` (`id`, `user_id`, `type`, `community_name`, `management_company`, `location`, `contact_person`, `email`, `resident_spaces`, `number_of_visitor_spaces`, `bank_account_number`, `routing_number`, `lat`, `lang`, `status`, `price_name`, `created_at`, `updated_at`) VALUES
(1, 1, 'House', 'aas updated', 'asdasd', 'Islamabad, Islamabad Capital Territory, Pakistan', 'Mian Roshan', 'abidabad786@gmail.com', '232', '23', '234234', '23', '33.6844202', '73.04788479999999', 1, NULL, '2023-11-06 15:52:13', '2023-11-08 17:32:56'),
(2, 1, 'House', 'Zubair Lara', 'Management Company', 'Test Location', 'Test Contact Person', 'test@gmail.com', 'test', 'test', '123456', '123456', '32.163827', '74.189673', 1, NULL, '2023-11-06 17:08:58', '2023-11-06 17:51:12'),
(6, 1, 'House', 'aas', 'asdasd', 'Cali, Valle del Cauca, Colombia', 'Mian Roshan(testing account)', 'abidabad786@gmail.com', '232', '23', '234234', '23', '3.4516467', '-76.5319854', 1, NULL, '2023-11-07 01:50:21', '2023-11-07 01:50:21'),
(5, 1, 'House', 'comunita', 'asdasd', 'Atlanta, GA, USA', 'Mian Roshan(testing account)', 'abidabad786@gmail.com', '232', '23', '234234', '23', '33.748752', '-84.38768449999999', 0, NULL, '2023-11-06 18:27:00', '2023-11-07 01:51:24'),
(7, 1, 'Appartment', 'aas', 'asdasd', 'Mexico City, CDMX, Mexico', 'Mian Roshan(testing account)', 'abidabad786@gmail.com', '32`', '343', '343343344344', '343343', '19.4326077', '-99.133208', 0, NULL, '2023-11-07 01:52:08', '2023-11-07 01:52:08'),
(8, 1, 'Office', 'asda', 'asdasd', 'Cádiz, Spain', 'Mian Roshan(testing account)', 'abidabad786@gmail.com', '232', '2', '3423423422wd2', '232', '36.5210142', '-6.2804565', 1, NULL, '2023-11-07 01:52:58', '2023-11-07 01:52:58'),
(9, 1, 'Others', 'test', 'test', '23936 Testorf-Steinfort, Germany', 'test', 'test@gmail.com', '20', '10', '7821738723', '837', '53.7806491', '11.26495', 0, NULL, '2023-11-08 11:01:40', '2023-11-08 11:01:40'),
(10, 1, 'House', 'Test Community 3', 'Management Company', 'Test Location', 'Test Contact Person', 'test@gmail.com', 'test', 'test', '123456', '123456', '32.163827', '74.189673', 1, NULL, '2023-11-08 12:37:00', '2023-11-08 12:37:00');

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

--
-- Estructura de tabla para la tabla `community_pricings`
--

CREATE TABLE `community_pricings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `community_id` bigint(20) UNSIGNED NOT NULL,
  `hours` varchar(191) DEFAULT NULL,
  `price` varchar(191) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `community_pricings`
--

INSERT INTO `community_pricings` (`id`, `community_id`, `hours`, `price`, `created_at`, `updated_at`) VALUES
(66, 1, '43', '453', '2023-11-08 17:32:56', '2023-11-08 17:32:56'),
(65, 1, '2', '45', '2023-11-08 17:32:56', '2023-11-08 17:32:56'),
(24, 2, '2', '10', '2023-11-06 17:51:12', '2023-11-06 17:51:12'),
(23, 2, '3', '5', '2023-11-06 17:51:12', '2023-11-06 17:51:12'),
(26, 3, '3', '5', '2023-11-06 18:01:44', '2023-11-06 18:01:44'),
(25, 3, '2', '10', '2023-11-06 18:01:44', '2023-11-06 18:01:44'),
(7, 4, '2', '10', '2023-11-06 17:09:11', '2023-11-06 17:09:11'),
(8, 4, '3', '5', '2023-11-06 17:09:11', '2023-11-06 17:09:11'),
(64, 1, '2', '34', '2023-11-08 17:32:56', '2023-11-08 17:32:56'),
(52, 5, '43', '3443', '2023-11-07 01:51:24', '2023-11-07 01:51:24'),
(51, 5, '23', '45', '2023-11-07 01:51:24', '2023-11-07 01:51:24'),
(50, 6, '2', '3', '2023-11-07 01:50:21', '2023-11-07 01:50:21'),
(53, 7, '2', '45', '2023-11-07 01:52:08', '2023-11-07 01:52:08'),
(54, 8, '33', '234', '2023-11-07 01:52:58', '2023-11-07 01:52:58'),
(58, 9, '1', '10', '2023-11-08 11:01:40', '2023-11-08 11:01:40'),
(62, 10, '2', '10', '2023-11-08 12:37:00', '2023-11-08 12:37:00'),
(63, 10, '3', '5', '2023-11-08 12:37:00', '2023-11-08 12:37:00');

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

--
-- Estructura de tabla para la tabla `failed_jobs`
--

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

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

--
-- Estructura de tabla para la tabla `locations`
--

CREATE TABLE `locations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(11) NOT NULL,
  `type` varchar(191) NOT NULL,
  `address` varchar(191) NOT NULL,
  `notes` text DEFAULT NULL,
  `price` varchar(191) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `status` tinyint(4) NOT NULL DEFAULT 1 COMMENT '0: inactive, 1:active'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `migrations`
--

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

--
-- Volcado de datos para la tabla `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, '2016_06_01_000001_create_oauth_auth_codes_table', 1),
(4, '2016_06_01_000002_create_oauth_access_tokens_table', 1),
(5, '2016_06_01_000003_create_oauth_refresh_tokens_table', 1),
(6, '2016_06_01_000004_create_oauth_clients_table', 1),
(7, '2016_06_01_000005_create_oauth_personal_access_clients_table', 1),
(8, '2019_08_19_000000_create_failed_jobs_table', 1),
(9, '2023_10_23_085005_create_permission_tables', 1),
(10, '2023_10_23_110904_create_locations_table', 1),
(11, '2023_10_23_171329_add_status_to_locations_table', 1),
(12, '2023_10_23_173519_add_telephone_to_users_table', 1),
(13, '2023_10_24_161241_create_parkings_table', 1),
(14, '2023_10_24_162515_add_social_columns_to_users_table', 1),
(15, '2023_10_24_181624_add_price_to_parking_table', 1),
(16, '2023_10_31_155158_add_status_to_users_table', 1),
(17, '2023_10_31_164543_create_communities_table', 1),
(18, '2023_10_31_172844_create_community_pricings_table', 1),
(19, '2023_11_01_100006_add_otp_to_users_table', 2),
(20, '2023_11_01_130123_add_community_to_users_table', 3),
(21, '2023_11_02_092639_add_profile_to_users_table', 4),
(22, '2023_11_02_095706_add_self_update_to_users_table', 5),
(23, '2023_11_06_181535_add_company_name_to_users_table', 6),
(24, '2023_11_07_082103_add_customer_id_to_users_table', 7),
(25, '2023_11_07_091310_add_ephemeral_key_to_users_table', 7),
(26, '2023_11_07_094438_add_stripe_to_parkings_table', 7),
(27, '2023_11_07_114355_add_intent_secret_to_parkings_table', 8),
(28, '2023_11_07_201818_create_user_communities_table', 9),
(29, '0000_00_00_000000_create_websockets_statistics_entries_table', 10),
(30, '2023_11_09_150951_add_spent_time_to_parkings_table', 10);

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

--
-- Estructura de tabla para la tabla `model_has_permissions`
--

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

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

--
-- Estructura de tabla para la tabla `model_has_roles`
--

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

--
-- Volcado de datos para la tabla `model_has_roles`
--

INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES
(1, 'App\\Models\\User', 2),
(1, 'App\\Models\\User', 4),
(1, 'App\\Models\\User', 5),
(1, 'App\\Models\\User', 6),
(1, 'App\\Models\\User', 7),
(1, 'App\\Models\\User', 27),
(1, 'App\\Models\\User', 28),
(1, 'App\\Models\\User', 29),
(1, 'App\\Models\\User', 30),
(1, 'App\\Models\\User', 31),
(2, 'App\\Models\\User', 16),
(2, 'App\\Models\\User', 23),
(2, 'App\\Models\\User', 24),
(2, 'App\\Models\\User', 25),
(2, 'App\\Models\\User', 26),
(4, 'App\\Models\\User', 1);

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

--
-- Estructura de tabla para la tabla `oauth_auth_codes`
--

CREATE TABLE `oauth_auth_codes` (
  `id` varchar(100) NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `client_id` bigint(20) UNSIGNED NOT NULL,
  `scopes` text DEFAULT NULL,
  `revoked` tinyint(1) NOT NULL,
  `expires_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `oauth_personal_access_clients`
--

CREATE TABLE `oauth_personal_access_clients` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `client_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `oauth_personal_access_clients`
--

INSERT INTO `oauth_personal_access_clients` (`id`, `client_id`, `created_at`, `updated_at`) VALUES
(1, 1, '2023-11-01 15:40:06', '2023-11-01 15:40:06');

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

--
-- Estructura de tabla para la tabla `permissions`
--

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

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

--
-- Estructura de tabla para la tabla `roles`
--

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

--
-- Volcado de datos para la tabla `roles`
--

INSERT INTO `roles` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
(1, 'User', 'web', NULL, NULL),
(2, 'Manager', 'web', NULL, NULL),
(3, 'Enforce', 'web', NULL, NULL),
(4, 'Admin', 'web', NULL, NULL);

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

--
-- Estructura de tabla para la tabla `role_has_permissions`
--

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

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

--
-- Estructura de tabla para la tabla `user_communities`
--

CREATE TABLE `user_communities` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `community_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `user_communities`
--

INSERT INTO `user_communities` (`id`, `user_id`, `community_id`, `created_at`, `updated_at`) VALUES
(1, 21, 1, '2023-11-08 01:58:53', '2023-11-08 01:58:53'),
(6, 19, 5, '2023-11-08 17:03:41', '2023-11-08 17:03:41'),
(5, 19, 2, '2023-11-08 17:03:41', '2023-11-08 17:03:41'),
(22, 22, 6, '2023-11-08 17:31:09', '2023-11-08 17:31:09'),
(21, 22, 10, '2023-11-08 17:31:09', '2023-11-08 17:31:09'),
(20, 22, 5, '2023-11-08 17:31:09', '2023-11-08 17:31:09'),
(19, 22, 2, '2023-11-08 17:31:09', '2023-11-08 17:31:09'),
(18, 20, 9, '2023-11-08 17:29:04', '2023-11-08 17:29:04'),
(17, 20, 2, '2023-11-08 17:29:04', '2023-11-08 17:29:04'),
(16, 20, 8, '2023-11-08 17:29:04', '2023-11-08 17:29:04'),
(23, 22, 8, '2023-11-08 17:31:09', '2023-11-08 17:31:09');

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

--
-- Estructura de tabla para la tabla `websockets_statistics_entries`
--

CREATE TABLE `websockets_statistics_entries` (
  `id` int(10) UNSIGNED NOT NULL,
  `app_id` varchar(191) NOT NULL,
  `peak_connection_count` int(11) NOT NULL,
  `websocket_message_count` int(11) NOT NULL,
  `api_message_count` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `communities`
--
ALTER TABLE `communities`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `community_pricings`
--
ALTER TABLE `community_pricings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `community_pricings_community_id_foreign` (`community_id`);

--
-- Indices de la tabla `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indices de la tabla `locations`
--
ALTER TABLE `locations`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `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`);

--
-- Indices de la tabla `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`);

--
-- Indices de la tabla `oauth_auth_codes`
--
ALTER TABLE `oauth_auth_codes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `oauth_auth_codes_user_id_index` (`user_id`);

--
-- Indices de la tabla `oauth_personal_access_clients`
--
ALTER TABLE `oauth_personal_access_clients`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `permissions_name_guard_name_unique` (`name`,`guard_name`) USING HASH;

--
-- Indices de la tabla `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `roles_name_guard_name_unique` (`name`,`guard_name`) USING HASH;

--
-- Indices de la tabla `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`);

--
-- Indices de la tabla `user_communities`
--
ALTER TABLE `user_communities`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_communities_user_id_foreign` (`user_id`),
  ADD KEY `user_communities_community_id_foreign` (`community_id`);

--
-- Indices de la tabla `websockets_statistics_entries`
--
ALTER TABLE `websockets_statistics_entries`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `communities`
--
ALTER TABLE `communities`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT de la tabla `community_pricings`
--
ALTER TABLE `community_pricings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=67;

--
-- AUTO_INCREMENT de la tabla `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `locations`
--
ALTER TABLE `locations`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;

--
-- AUTO_INCREMENT de la tabla `oauth_personal_access_clients`
--
ALTER TABLE `oauth_personal_access_clients`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `roles`
--
ALTER TABLE `roles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `user_communities`
--
ALTER TABLE `user_communities`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- AUTO_INCREMENT de la tabla `websockets_statistics_entries`
--
ALTER TABLE `websockets_statistics_entries`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;

