-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 08, 2026 at 12:30 PM
-- Server version: 10.4.28-MariaDB
-- PHP Version: 8.2.4

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `hospital_db`
--

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

--
-- Table structure for table `appointments`
--

CREATE TABLE `appointments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `appointment_id` varchar(255) NOT NULL,
  `patient_id` bigint(20) UNSIGNED NOT NULL,
  `doctor_id` bigint(20) UNSIGNED NOT NULL,
  `department_id` bigint(20) UNSIGNED NOT NULL,
  `appointment_date` date NOT NULL,
  `appointment_time` time NOT NULL,
  `status` enum('scheduled','confirmed','checked_in','in_progress','completed','cancelled','no_show') NOT NULL DEFAULT 'scheduled',
  `appointment_type` enum('general','followup','emergency','consultation') NOT NULL DEFAULT 'general',
  `symptoms` text DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `queue_number` int(11) DEFAULT NULL,
  `check_in_time` datetime DEFAULT NULL,
  `check_out_time` datetime DEFAULT NULL,
  `is_emergency` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `appointment_requests`
--

CREATE TABLE `appointment_requests` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `full_name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(255) NOT NULL,
  `address` varchar(255) DEFAULT NULL,
  `service` varchar(255) DEFAULT NULL,
  `preferred_doctor` varchar(255) DEFAULT NULL,
  `doctor_id` bigint(20) UNSIGNED DEFAULT NULL,
  `preferred_date` date DEFAULT NULL,
  `preferred_time` varchar(255) DEFAULT NULL,
  `reason` text DEFAULT NULL,
  `status` enum('new','contacted','confirmed','cancelled') NOT NULL DEFAULT 'new',
  `email_sent` tinyint(1) NOT NULL DEFAULT 0,
  `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 `appointment_requests`
--

INSERT INTO `appointment_requests` (`id`, `full_name`, `email`, `phone`, `address`, `service`, `preferred_doctor`, `doctor_id`, `preferred_date`, `preferred_time`, `reason`, `status`, `email_sent`, `created_at`, `updated_at`) VALUES
(1, 'ssekajja swaburu', 'ssekajjaswaburu493@gmail.com', '0700000000', 'kira', 'diabetes-clinic', 'paediatrician', NULL, '2026-09-04', '23:01', '8o86', 'new', 1, '2026-09-07 17:01:31', '2026-09-07 17:01:35');

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

--
-- Table structure for table `cache`
--

CREATE TABLE `cache` (
  `key` varchar(255) NOT NULL,
  `value` mediumtext NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cache`
--

INSERT INTO `cache` (`key`, `value`, `expiration`) VALUES
('7-hills-medical-centre-cache-a75f3f172bfb296f2e10cbfc6dfc1883', 'i:2;', 1788860038),
('7-hills-medical-centre-cache-a75f3f172bfb296f2e10cbfc6dfc1883:timer', 'i:1788860038;', 1788860038),
('7-hills-medical-centre-cache-d2bfa8e8b749d2772a21edee7b70a2b3', 'i:16;', 1788859976),
('7-hills-medical-centre-cache-d2bfa8e8b749d2772a21edee7b70a2b3:timer', 'i:1788859976;', 1788859976),
('7-hills-medical-centre-cache-e9b6cc1432541b9ceebf113eee05eeba', 'i:1;', 1788776719),
('7-hills-medical-centre-cache-e9b6cc1432541b9ceebf113eee05eeba:timer', 'i:1788776719;', 1788776719),
('7-hills-medical-centre-cache-f1f70ec40aaa556905d4a030501c0ba4', 'i:12;', 1788860352),
('7-hills-medical-centre-cache-f1f70ec40aaa556905d4a030501c0ba4:timer', 'i:1788860352;', 1788860352);

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

--
-- Table structure for table `cache_locks`
--

CREATE TABLE `cache_locks` (
  `key` varchar(255) NOT NULL,
  `owner` varchar(255) NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `contact_messages`
--

CREATE TABLE `contact_messages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `status` enum('new','read','replied') NOT NULL DEFAULT 'new',
  `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 `contact_messages`
--

INSERT INTO `contact_messages` (`id`, `name`, `email`, `subject`, `message`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Byukuenge Alphonse', 'alphonso2009@gmail.com', 'Change Internet Service Provider', 'xxsx', 'new', '2026-09-07 16:28:46', '2026-09-07 16:28:46'),
(2, 'Byukuenge Alphonse', 'alphonso2009@gmail.com', 'Change Internet Service Provider', 'joij', 'new', '2026-09-07 16:43:26', '2026-09-07 16:43:26'),
(3, 'Byukuenge Alphonse', 'alphonso2009@gmail.com', 'Change Internet Service Provider', 'pmo', 'read', '2026-09-07 16:47:42', '2026-09-08 04:02:46');

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

--
-- Table structure for table `departments`
--

CREATE TABLE `departments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `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 `departments`
--

INSERT INTO `departments` (`id`, `name`, `description`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Emergency/Casualty Department', 'Handles urgent and life-threatening conditions, operating 24/7', 'active', '2026-09-08 04:06:13', '2026-09-08 04:06:13');

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

--
-- Table structure for table `doctors`
--

CREATE TABLE `doctors` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED NOT NULL,
  `full_name` varchar(255) NOT NULL,
  `specialization` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `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 `doctors`
--

INSERT INTO `doctors` (`id`, `user_id`, `department_id`, `full_name`, `specialization`, `email`, `phone`, `status`, `created_at`, `updated_at`) VALUES
(1, NULL, 1, 'Dr.Ssekajja Swabru', 'First Aid', 'reciptionist@7hillsmedical.com', '0700000000', 'active', '2026-09-08 04:07:13', '2026-09-08 04:07:13'),
(2, 3, 1, 'Dr.jane', NULL, NULL, NULL, 'active', '2026-09-08 06:19:31', '2026-09-08 06:31:14');

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

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

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) 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=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `queue` varchar(255) NOT NULL,
  `payload` longtext NOT NULL,
  `attempts` tinyint(3) UNSIGNED NOT NULL,
  `reserved_at` int(10) UNSIGNED DEFAULT NULL,
  `available_at` int(10) UNSIGNED NOT NULL,
  `created_at` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_jobs` int(11) NOT NULL,
  `pending_jobs` int(11) NOT NULL,
  `failed_jobs` int(11) NOT NULL,
  `failed_job_ids` longtext NOT NULL,
  `options` mediumtext DEFAULT NULL,
  `cancelled_at` int(11) DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `finished_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `medical_records`
--

CREATE TABLE `medical_records` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) 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) 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, '0001_01_01_000000_create_users_table', 1),
(6, '0001_01_01_000001_create_cache_table', 2),
(7, '0001_01_01_000002_create_jobs_table', 2),
(8, '2026_09_07_073140_create_personal_access_tokens_table', 2),
(9, '2026_09_07_073212_create_patients_table', 2),
(10, '2026_09_07_073214_create_departments_table', 3),
(11, '2026_09_07_073215_create_website_appointment_requests_table', 4),
(12, '2026_09_07_073216_create_contact_messages_table', 4),
(13, '2026_09_07_073216_create_newsletter_subscribers_table', 4),
(14, '2026_09_07_073217_create_medical_records_table', 4),
(15, '2026_09_07_073830_create_services_table', 4),
(16, '2026_09_07_074713_create_permission_tables', 5),
(17, '2026_09_07_080036_add_status_to_users_table', 6),
(18, '2026_08_31_000002_create_appointment_requests_table', 7),
(19, '2026_09_07_080059_add_status_to_users_table', 8),
(20, '2026_09_07_201945_create_departments_table', 9),
(21, '2026_09_07_201948_create_doctors_table', 9),
(22, '2026_09_08_080912_add_doctor_id_to_appointment_requests_table', 10),
(23, '2026_09_08_081412_add_doctor_id_to_website_appointment_requests_table', 11);

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

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

CREATE TABLE `model_has_permissions` (
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `model_type` varchar(255) 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) 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),
(4, 'App\\Models\\User', 3);

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

--
-- Table structure for table `newsletter_subscribers`
--

CREATE TABLE `newsletter_subscribers` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `email` varchar(255) NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `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 `newsletter_subscribers`
--

INSERT INTO `newsletter_subscribers` (`id`, `email`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'sssss@gmail.com', 1, '2026-09-07 16:48:49', '2026-09-07 16:48:49');

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

--
-- Table structure for table `password_reset_tokens`
--

CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) NOT NULL,
  `token` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `patients`
--

CREATE TABLE `patients` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `patient_id` varchar(255) NOT NULL,
  `first_name` varchar(255) NOT NULL,
  `last_name` varchar(255) NOT NULL,
  `date_of_birth` date NOT NULL,
  `gender` enum('male','female','other') NOT NULL,
  `blood_group` varchar(255) DEFAULT NULL,
  `phone` varchar(255) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `emergency_contact_name` varchar(255) DEFAULT NULL,
  `emergency_contact_phone` varchar(255) DEFAULT NULL,
  `insurance_provider` varchar(255) DEFAULT NULL,
  `insurance_number` varchar(255) DEFAULT NULL,
  `allergies` text DEFAULT NULL,
  `medical_history` text DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT 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 `patients`
--

INSERT INTO `patients` (`id`, `patient_id`, `first_name`, `last_name`, `date_of_birth`, `gender`, `blood_group`, `phone`, `email`, `address`, `emergency_contact_name`, `emergency_contact_phone`, `insurance_provider`, `insurance_number`, `allergies`, `medical_history`, `user_id`, `created_at`, `updated_at`) VALUES
(1, 'PAT-2026-0001', 'Kakooza', 'Ibrahim', '2026-09-10', 'male', 'B+', '0700000000', 'sssss@gmail.com', 'kira', 'SWABRU', '0709444591', NULL, NULL, NULL, NULL, NULL, '2026-09-07 17:45:22', '2026-09-07 17:45:22');

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

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

CREATE TABLE `permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) 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, 'view_website_requests', 'web', '2026-09-07 04:59:21', '2026-09-07 04:59:21'),
(2, 'update_website_requests', 'web', '2026-09-07 04:59:21', '2026-09-07 04:59:21'),
(3, 'delete_website_requests', 'web', '2026-09-07 04:59:21', '2026-09-07 04:59:21'),
(4, 'view_newsletter_subscribers', 'web', '2026-09-07 04:59:22', '2026-09-07 04:59:22'),
(5, 'delete_newsletter_subscribers', 'web', '2026-09-07 04:59:22', '2026-09-07 04:59:22'),
(6, 'view_contact_messages', 'web', '2026-09-07 04:59:22', '2026-09-07 04:59:22'),
(7, 'update_contact_messages', 'web', '2026-09-07 04:59:22', '2026-09-07 04:59:22'),
(8, 'delete_contact_messages', 'web', '2026-09-07 04:59:22', '2026-09-07 04:59:22'),
(9, 'view_reports', 'web', '2026-09-07 09:31:46', '2026-09-07 09:31:46'),
(10, 'manage_settings', 'web', '2026-09-07 09:31:46', '2026-09-07 09:31:46'),
(11, 'view_dashboard', 'web', '2026-09-07 09:31:46', '2026-09-07 09:31:46'),
(12, 'view_appointments', 'web', '2026-09-07 09:31:46', '2026-09-07 09:31:46'),
(13, 'view_doctors', 'web', '2026-09-07 09:31:46', '2026-09-07 09:31:46'),
(14, 'view_departments', 'web', '2026-09-07 09:31:46', '2026-09-07 09:31:46'),
(15, 'view_medical-records', 'web', '2026-09-07 09:31:46', '2026-09-07 09:31:46'),
(16, 'view_laboratory', 'web', '2026-09-07 09:31:46', '2026-09-07 09:31:46'),
(17, 'view_billing', 'web', '2026-09-07 09:31:46', '2026-09-07 09:31:46'),
(18, 'view_patients', 'web', '2026-09-07 17:14:40', '2026-09-07 17:14:40'),
(19, 'view_own_appointments', 'web', '2026-09-08 05:32:03', '2026-09-08 05:32:03');

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

--
-- Table structure for table `personal_access_tokens`
--

CREATE TABLE `personal_access_tokens` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tokenable_type` varchar(255) NOT NULL,
  `tokenable_id` bigint(20) UNSIGNED NOT NULL,
  `name` text NOT NULL,
  `token` varchar(64) NOT NULL,
  `abilities` text DEFAULT NULL,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `expires_at` timestamp NULL DEFAULT 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 `personal_access_tokens`
--

INSERT INTO `personal_access_tokens` (`id`, `tokenable_type`, `tokenable_id`, `name`, `token`, `abilities`, `last_used_at`, `expires_at`, `created_at`, `updated_at`) VALUES
(1, 'App\\Models\\User', 1, 'auth_token', '49c6754223d80a897dbd9d7b7ec204c73bb67375ae75fa27083039ad9e94d5d9', '[\"*\"]', NULL, NULL, '2026-09-07 05:54:11', '2026-09-07 05:54:11'),
(2, 'App\\Models\\User', 1, 'auth_token', 'e80fec0e305a7fe873e6ea9cdfde087a66673694d59af88e95b920941fcad837', '[\"*\"]', NULL, NULL, '2026-09-07 06:06:07', '2026-09-07 06:06:07'),
(3, 'App\\Models\\User', 1, 'auth_token', '704b7e9c8f2edb304f01cbfd95cf8027959444052ba43452a61e1f89d9770718', '[\"*\"]', NULL, NULL, '2026-09-07 06:29:12', '2026-09-07 06:29:12'),
(4, 'App\\Models\\User', 1, 'auth_token', '1c464587be84516387c01bf5fcc4b4b73b85dcf9fc34c30f83be3590f5c812b0', '[\"*\"]', NULL, NULL, '2026-09-07 06:35:03', '2026-09-07 06:35:03'),
(5, 'App\\Models\\User', 1, 'auth_token', '98c44341d178ab233a6e739e6f3755ae1e6188571a020fad210d05048d2eb263', '[\"*\"]', NULL, NULL, '2026-09-07 06:52:12', '2026-09-07 06:52:12'),
(6, 'App\\Models\\User', 1, 'auth_token', '0491143ed8d60a0d52be6ce3d69631b4e98253e8a11faf4d4f11681c7c37dde0', '[\"*\"]', NULL, NULL, '2026-09-07 06:58:23', '2026-09-07 06:58:23'),
(7, 'App\\Models\\User', 2, 'auth_token', 'ee771ee7d03a6cf6000a8d9371b50925eead763d003a1d99e6a6c06ed2df27fb', '[\"*\"]', NULL, NULL, '2026-09-07 07:23:24', '2026-09-07 07:23:24'),
(8, 'App\\Models\\User', 1, 'auth_token', '40fcbf8b29f6012ad7bb701b49bca4c578691e0a2853dd337509f3ba52a0a1b1', '[\"*\"]', NULL, NULL, '2026-09-07 07:24:20', '2026-09-07 07:24:20'),
(9, 'App\\Models\\User', 1, 'auth_token', '7485b5ff29ac29756437f8a32e8fbe054b2d29005cd46eeb91ba7ba7e0e57708', '[\"*\"]', NULL, NULL, '2026-09-07 08:44:44', '2026-09-07 08:44:44'),
(10, 'App\\Models\\User', 1, 'auth_token', '0672f0c7e58c1dc4d79f4ca0bcac7eef357e3003331e6d32c8e5fb6110f7e33b', '[\"*\"]', NULL, NULL, '2026-09-07 09:31:05', '2026-09-07 09:31:05'),
(11, 'App\\Models\\User', 1, 'auth_token', 'ad879cb49f8d5deeb8db39dd95a5489955a8028d8f27b78a2b3dad384f54f95a', '[\"*\"]', NULL, NULL, '2026-09-07 09:32:04', '2026-09-07 09:32:04'),
(12, 'App\\Models\\User', 1, 'auth_token', '9c3366f52ab1b994c72e76ee75b487770fa2ef3238a350bfc157e004c3faf465', '[\"*\"]', NULL, NULL, '2026-09-07 09:40:44', '2026-09-07 09:40:44'),
(13, 'App\\Models\\User', 1, 'auth_token', '83b232d429ec9ee1b16a27ba808b5bbd05c406e6b8f68a27f8bbb665686ef1f2', '[\"*\"]', NULL, NULL, '2026-09-07 09:51:22', '2026-09-07 09:51:22'),
(14, 'App\\Models\\User', 1, 'auth_token', '1e7412b489affa6f0adf2b0949c21453e96074d662a08bf2ac7d55018923b0e5', '[\"*\"]', NULL, NULL, '2026-09-07 09:52:00', '2026-09-07 09:52:00'),
(15, 'App\\Models\\User', 1, 'auth_token', '2ef9f9440926a1d54516cf4caa704fe3f90f1906ddd4c2ba57e42eb1b57646bb', '[\"*\"]', NULL, NULL, '2026-09-07 12:45:50', '2026-09-07 12:45:50'),
(16, 'App\\Models\\User', 1, 'auth_token', 'fb84ad1749b33f108898682c7719e0a1519eaa1fbaee85c21d923aca07b6b235', '[\"*\"]', NULL, NULL, '2026-09-07 14:25:20', '2026-09-07 14:25:20'),
(17, 'App\\Models\\User', 1, 'auth_token', '42b171a6f2a51e2dcda80e814a755227aaeb32f32508a91d05698fd67706a54d', '[\"*\"]', NULL, NULL, '2026-09-07 17:02:18', '2026-09-07 17:02:18'),
(18, 'App\\Models\\User', 1, 'auth_token', '86d3e9060b18c47586200d1d2e58ac809f6c15a5e5becfc74f2f59d293cc5e83', '[\"*\"]', NULL, NULL, '2026-09-07 17:11:41', '2026-09-07 17:11:41'),
(19, 'App\\Models\\User', 1, 'auth_token', '21fce11d15e91c27ed8b04cfc0a61bb86e3d5561ab08e5f13150620e39ff99cd', '[\"*\"]', NULL, NULL, '2026-09-07 17:14:48', '2026-09-07 17:14:48'),
(20, 'App\\Models\\User', 1, 'auth_token', '98f91f2d33d0f43ea8b9f2cd6122cf575aea47db13cdf3f009e0177c1925b9e6', '[\"*\"]', NULL, NULL, '2026-09-07 17:16:59', '2026-09-07 17:16:59'),
(21, 'App\\Models\\User', 1, 'auth_token', '60c16a8c42c46f8818d5cb9969da2dfeb82f0564b02e4439b24212d02b1d9734', '[\"*\"]', NULL, NULL, '2026-09-07 17:27:43', '2026-09-07 17:27:43'),
(22, 'App\\Models\\User', 1, 'auth_token', '504af56fa2ddeb92ae0740a07e3785fd9be3f30c174d9799dab7af51bdf010bd', '[\"*\"]', NULL, NULL, '2026-09-07 17:33:15', '2026-09-07 17:33:15'),
(23, 'App\\Models\\User', 1, 'auth_token', '18f95daac3e01e28d0d119194be98cd4f2809e7f459df6adefb334f7a76a5add', '[\"*\"]', NULL, NULL, '2026-09-07 17:34:32', '2026-09-07 17:34:32'),
(24, 'App\\Models\\User', 1, 'auth_token', 'e2c1bc90234167ea34418262e5aa7967d522f94fa807079f69c00e3f924fe914', '[\"*\"]', NULL, NULL, '2026-09-07 17:45:04', '2026-09-07 17:45:04'),
(25, 'App\\Models\\User', 1, 'auth_token', '3c43995487e265c9191e3224c95dec499be9532fb2aad4d2b8eb217c47bf9292', '[\"*\"]', NULL, NULL, '2026-09-07 17:46:30', '2026-09-07 17:46:30'),
(26, 'App\\Models\\User', 1, 'auth_token', '66dc4cbafcafc376faf6bb57d1a473cf1d7ae9d117a1e7f8fa4b3d926fddd8cc', '[\"*\"]', NULL, NULL, '2026-09-07 17:50:49', '2026-09-07 17:50:49'),
(27, 'App\\Models\\User', 1, 'auth_token', '6926378f32cc1eb9521846c18160c13010ecbe6c412aa32539023d5f9f2ba6ad', '[\"*\"]', NULL, NULL, '2026-09-07 17:53:53', '2026-09-07 17:53:53'),
(28, 'App\\Models\\User', 1, 'auth_token', 'cf9a5f398477f24b2c90c86a98fd3632a29739c1d8a7dad425b232dc761695fd', '[\"*\"]', NULL, NULL, '2026-09-07 17:56:55', '2026-09-07 17:56:55'),
(29, 'App\\Models\\User', 1, 'auth_token', '52bab628ec80cc6d700a162ead367d0ae78c36b66bf0c50d74db572c9bddd902', '[\"*\"]', NULL, NULL, '2026-09-07 18:00:15', '2026-09-07 18:00:15'),
(30, 'App\\Models\\User', 1, 'auth_token', '8f76202d515ec8127e0aa18e9533ee84307ef78086612017953480ad764b59a4', '[\"*\"]', NULL, NULL, '2026-09-07 18:04:03', '2026-09-07 18:04:03'),
(31, 'App\\Models\\User', 1, 'auth_token', 'd28afd244be5d9f8ecfe7ac4d2f7a854da255d243b49a3a646f3c3bb11018810', '[\"*\"]', NULL, NULL, '2026-09-08 03:56:24', '2026-09-08 03:56:24'),
(32, 'App\\Models\\User', 1, 'auth_token', '4fa65a2ea320dc6b2642da7d522687d7e05ca968c12ab41ff0e1415be08e58cf', '[\"*\"]', NULL, NULL, '2026-09-08 04:04:28', '2026-09-08 04:04:28'),
(33, 'App\\Models\\User', 1, 'auth_token', 'dfc3c768f17253b9e091d22ce09b424ec9b68dcf03f266da7f7574585093f5a4', '[\"*\"]', NULL, NULL, '2026-09-08 04:07:46', '2026-09-08 04:07:46'),
(34, 'App\\Models\\User', 1, 'auth_token', '4dc10426bfda59e76ae3498dac4dd760e9065864f3275ad863507ff5b78ff1ce', '[\"*\"]', NULL, NULL, '2026-09-08 04:46:48', '2026-09-08 04:46:48'),
(35, 'App\\Models\\User', 1, 'auth_token', '8f830f189c6e8094f5a52634af6f256c8fd532b7a39fad0ba8f5bcab3016a528', '[\"*\"]', NULL, NULL, '2026-09-08 04:58:30', '2026-09-08 04:58:30'),
(36, 'App\\Models\\User', 1, 'auth_token', '3b12db62a9b02999fca459678b780fd12c7e507f48491556d84b50624ad54ec5', '[\"*\"]', NULL, NULL, '2026-09-08 05:34:09', '2026-09-08 05:34:09'),
(37, 'App\\Models\\User', 1, 'auth_token', '95904fa6a9f03cb54dc4ae18ddf827f8b477dd78194c230565b311eaefcc8078', '[\"*\"]', NULL, NULL, '2026-09-08 05:46:00', '2026-09-08 05:46:00'),
(38, 'App\\Models\\User', 1, 'auth_token', '486e7890ddf84bf2d52bd429d0395a90d975e244af37b16cde2d468740d1c956', '[\"*\"]', NULL, NULL, '2026-09-08 05:46:56', '2026-09-08 05:46:56'),
(39, 'App\\Models\\User', 1, 'auth_token', 'b82ef28dc2c2297bf62b096d46aad33e9ec363b29ea37944d1e46da206bf4c5c', '[\"*\"]', '2026-09-08 06:04:54', NULL, '2026-09-08 06:03:37', '2026-09-08 06:04:54'),
(40, 'App\\Models\\User', 1, 'auth_token', '448579173b7f3808fa4f454367f0b8545eaefc271b89ebf9303b8d60b20b5128', '[\"*\"]', '2026-09-08 06:05:30', NULL, '2026-09-08 06:04:57', '2026-09-08 06:05:30'),
(41, 'App\\Models\\User', 1, 'auth_token', '6aff05476c20ba2eddd1b636c4603685d7dbf61f7c803aaa1e3952f8d7ad46de', '[\"*\"]', '2026-09-08 06:06:25', NULL, '2026-09-08 06:05:33', '2026-09-08 06:06:25'),
(42, 'App\\Models\\User', 1, 'auth_token', '9acf7ac7c8d91a9b9f2ebdd4cbc010485bb205c1f67938b23281bf2205f65b4b', '[\"*\"]', '2026-09-08 06:20:10', NULL, '2026-09-08 06:06:26', '2026-09-08 06:20:10'),
(43, 'App\\Models\\User', 3, 'auth_token', 'ee720b8a31913974a638bfaecfb46c9483ca9e3a433b73843ed1a0d10aab40ef', '[\"*\"]', '2026-09-08 06:20:56', NULL, '2026-09-08 06:20:25', '2026-09-08 06:20:56'),
(44, 'App\\Models\\User', 1, 'auth_token', '201251b18f01c1b68ded3321705876f79e4450d04de276e001b8622f9b1431aa', '[\"*\"]', '2026-09-08 06:31:16', NULL, '2026-09-08 06:21:29', '2026-09-08 06:31:16'),
(45, 'App\\Models\\User', 3, 'auth_token', '8a9e6f6de7cca797e9134a07c1062f605ce837f6f50e7f7f5f9291ee4ab46def', '[\"*\"]', '2026-09-08 06:32:39', NULL, '2026-09-08 06:31:53', '2026-09-08 06:32:39'),
(46, 'App\\Models\\User', 1, 'auth_token', 'f407e94690eb93203b4159b6b07b64961e8d7308bf13f8629b7bc5f8dc3b8849', '[\"*\"]', '2026-09-08 06:33:32', NULL, '2026-09-08 06:32:59', '2026-09-08 06:33:32'),
(47, 'App\\Models\\User', 1, 'auth_token', 'a6755d88270166bf3ed64984a3f0de4dd8af7c22eec599e2c924dac715fe14c2', '[\"*\"]', '2026-09-08 06:38:33', NULL, '2026-09-08 06:33:34', '2026-09-08 06:38:33');

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

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

CREATE TABLE `roles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) 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', '2026-09-07 04:59:22', '2026-09-07 04:59:22'),
(2, 'receptionist', 'web', '2026-09-07 04:59:22', '2026-09-07 04:59:22'),
(3, 'manager', 'web', '2026-09-07 06:29:58', '2026-09-07 06:29:58'),
(4, 'doctor', 'web', '2026-09-08 06:15:37', '2026-09-08 06:15:37');

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

--
-- 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, 2),
(2, 1),
(2, 2),
(3, 1),
(4, 1),
(5, 1),
(6, 1),
(6, 2),
(6, 4),
(7, 1),
(8, 1),
(10, 1),
(11, 1),
(11, 4),
(12, 1),
(13, 1),
(14, 1),
(18, 1),
(19, 4);

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

--
-- Table structure for table `services`
--

CREATE TABLE `services` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `icon` varchar(255) DEFAULT NULL,
  `includes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`includes`)),
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `payload` longtext NOT NULL,
  `last_activity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('3GtEy5wKSTTMGAyoYcU48b9jUuORKw8sZEjtFdsq', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36 Edg/152.0.0.0', 'YToyOntzOjY6Il90b2tlbiI7czo0MDoiT2RjZE9ydG1Zd3I5bTBxVERuZE5PT3c4OW9kUVFRMFlWU1UyZjJVTiI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1788814450),
('bpI0jsEXgWQVvigsJrmzCBhHiWsijw8kwFQUkxft', 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36 Edg/152.0.0.0', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoiakExTUlrUnNrOFN6NVV1Z3VLWng1NG13bzVrNmtFclhxTFdBekZvdyI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDE6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC9zYW5jdHVtL2NzcmYtY29va2llIjtzOjU6InJvdXRlIjtzOjE5OiJzYW5jdHVtLmNzcmYtY29va2llIjt9czo1MDoibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiO2k6MTt9', 1788814433),
('ESA9BgtonjgHrmhsiX9Dk5SizawcqACn1dYTYXHW', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36 Edg/152.0.0.0', 'YToyOntzOjY6Il90b2tlbiI7czo0MDoiOVNxZkFZRzlpanpvRU9lZ3cwUGxoUUJkTDAyaEpZNVFZOTM0QTkzOCI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1788814439),
('h5A3D4TnMf3RTHjzPpaRv1d3x1ppydWvEwjtkEf2', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36 Edg/152.0.0.0', 'YToyOntzOjY6Il90b2tlbiI7czo0MDoid2FoMTRKZkJ3TmxFS1J5SFlmUjVIcXFOMlFXcnV5Z3VqbnlSVXF1MiI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1788814451),
('LerRS2nnp3iIXzAc4QUXiZ8oW3lqQqGsP9FXHMQX', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36 Edg/152.0.0.0', 'YToyOntzOjY6Il90b2tlbiI7czo0MDoiNFJWa1hPWFo1TVoyQk1ydVVkdk9MbEs3RVhDZ3ppOWxKYWdjU0JuRSI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1788814439),
('oJUdRDuGa2GdjSupPf5rd8b6HgsXCWTmz3F85Oaz', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36 Edg/152.0.0.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiZHpDbW1zZ1c1anJXb0sxbEF0ODg4ZmFId3NBNmNNbVlHY1dqODl6RiI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDE6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC9zYW5jdHVtL2NzcmYtY29va2llIjtzOjU6InJvdXRlIjtzOjE5OiJzYW5jdHVtLmNzcmYtY29va2llIjt9fQ==', 1788814430),
('VNVFdWDuBM88B8WwH88j9e0x4RGoHEN4WoMfk7nH', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36 Edg/152.0.0.0', 'YToyOntzOjY6Il90b2tlbiI7czo0MDoiWkNmREl3aG5uRXJTQlFVT05ScHQwRHk5VGhPSjZUajFQV2F0elBRVCI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1788814438),
('wFFbW1uNK7500wBYl5zbA2p3ed50H0pw1SnYMWHI', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36 Edg/152.0.0.0', 'YToyOntzOjY6Il90b2tlbiI7czo0MDoibWFGd1Fyc3VBWjdqWm8xNEIwMTV4TjlQWmllbUVpQVdodWJqNGNjNSI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1788814425);

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `status` enum('active','inactive','suspended') NOT NULL DEFAULT 'active',
  `remember_token` varchar(100) DEFAULT 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 `users`
--

INSERT INTO `users` (`id`, `name`, `email`, `phone`, `email_verified_at`, `password`, `status`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'Admin User', 'admin@7hillsmedical.com', NULL, NULL, '$2y$12$zoR3ghi85cds32Kc0iLZXO7WNYjnsLM1Zq0MyUVQeZnBMulHrm1ES', 'active', NULL, '2026-09-07 05:01:40', '2026-09-07 05:01:40'),
(3, 'Dr.Jane', 'doctor@7hillsmedical.com', NULL, NULL, '$2y$12$bBye5NFzVjmhMey8gnuJh.z1nB4aYaqVplVtuWwOWl4Pis0mjiaL6', 'active', NULL, '2026-09-08 06:18:21', '2026-09-08 06:18:21');

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

--
-- Table structure for table `website_appointment_requests`
--

CREATE TABLE `website_appointment_requests` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `full_name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(255) NOT NULL,
  `address` text DEFAULT NULL,
  `service` varchar(255) DEFAULT NULL,
  `preferred_doctor` varchar(255) DEFAULT NULL,
  `doctor_id` bigint(20) UNSIGNED DEFAULT NULL,
  `preferred_date` date DEFAULT NULL,
  `preferred_time` time DEFAULT NULL,
  `reason` text DEFAULT NULL,
  `status` enum('new','contacted','confirmed','cancelled') NOT NULL DEFAULT 'new',
  `email_sent` tinyint(1) NOT NULL DEFAULT 0,
  `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 `website_appointment_requests`
--

INSERT INTO `website_appointment_requests` (`id`, `full_name`, `email`, `phone`, `address`, `service`, `preferred_doctor`, `doctor_id`, `preferred_date`, `preferred_time`, `reason`, `status`, `email_sent`, `created_at`, `updated_at`) VALUES
(1, 'ssekajja swaburu', 'ssekajjaswaburu493@gmail.com', '0700000000', 'kira', 'internal-medicine', 'internal-medicine-specialist', 2, '2026-09-04', '05:10:00', 'hkbh', 'confirmed', 0, '2026-09-07 16:49:48', '2026-09-08 06:20:02');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `appointments`
--
ALTER TABLE `appointments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `appointments_patient_id_foreign` (`patient_id`),
  ADD KEY `appointments_doctor_id_foreign` (`doctor_id`);

--
-- Indexes for table `appointment_requests`
--
ALTER TABLE `appointment_requests`
  ADD PRIMARY KEY (`id`),
  ADD KEY `appointment_requests_doctor_id_foreign` (`doctor_id`);

--
-- Indexes for table `cache`
--
ALTER TABLE `cache`
  ADD PRIMARY KEY (`key`),
  ADD KEY `cache_expiration_index` (`expiration`);

--
-- Indexes for table `cache_locks`
--
ALTER TABLE `cache_locks`
  ADD PRIMARY KEY (`key`),
  ADD KEY `cache_locks_expiration_index` (`expiration`);

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

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

--
-- Indexes for table `doctors`
--
ALTER TABLE `doctors`
  ADD PRIMARY KEY (`id`),
  ADD KEY `doctors_user_id_foreign` (`user_id`),
  ADD KEY `doctors_department_id_foreign` (`department_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 `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

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

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

--
-- 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 `newsletter_subscribers`
--
ALTER TABLE `newsletter_subscribers`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `newsletter_subscribers_email_unique` (`email`);

--
-- Indexes for table `password_reset_tokens`
--
ALTER TABLE `password_reset_tokens`
  ADD PRIMARY KEY (`email`);

--
-- Indexes for table `patients`
--
ALTER TABLE `patients`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `patients_patient_id_unique` (`patient_id`),
  ADD UNIQUE KEY `patients_email_unique` (`email`),
  ADD KEY `patients_user_id_foreign` (`user_id`);

--
-- 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 `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`),
  ADD KEY `personal_access_tokens_expires_at_index` (`expires_at`);

--
-- 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 `services`
--
ALTER TABLE `services`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `services_slug_unique` (`slug`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`);

--
-- Indexes for table `website_appointment_requests`
--
ALTER TABLE `website_appointment_requests`
  ADD PRIMARY KEY (`id`),
  ADD KEY `website_appointment_requests_doctor_id_foreign` (`doctor_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `medical_records`
--
ALTER TABLE `medical_records`
  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=24;

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `appointments`
--
ALTER TABLE `appointments`
  ADD CONSTRAINT `appointments_doctor_id_foreign` FOREIGN KEY (`doctor_id`) REFERENCES `doctors` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `appointments_patient_id_foreign` FOREIGN KEY (`patient_id`) REFERENCES `patients` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `appointment_requests`
--
ALTER TABLE `appointment_requests`
  ADD CONSTRAINT `appointment_requests_doctor_id_foreign` FOREIGN KEY (`doctor_id`) REFERENCES `doctors` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `doctors`
--
ALTER TABLE `doctors`
  ADD CONSTRAINT `doctors_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `doctors_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- 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 `patients`
--
ALTER TABLE `patients`
  ADD CONSTRAINT `patients_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- 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;

--
-- Constraints for table `website_appointment_requests`
--
ALTER TABLE `website_appointment_requests`
  ADD CONSTRAINT `website_appointment_requests_doctor_id_foreign` FOREIGN KEY (`doctor_id`) REFERENCES `doctors` (`id`) ON DELETE SET NULL;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
