-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 15, 2026 at 11:56 AM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12

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: `nurtravelworld`
--

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

--
-- Table structure for table `agents`
--

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

INSERT INTO `agents` (`id`, `user_id`, `name`, `phone`, `note`, `status`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 3, 'kamrul hasan bd', '+8801762298533', 'ok', 'active', 1, '2026-02-06 23:48:18', '2026-02-27 02:34:41');

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

--
-- Table structure for table `agent_company`
--

CREATE TABLE `agent_company` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `agent_id` bigint(20) UNSIGNED NOT NULL,
  `company_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;

--
-- Dumping data for table `agent_company`
--

INSERT INTO `agent_company` (`id`, `agent_id`, `company_id`, `created_at`, `updated_at`) VALUES
(1, 1, 2, '2026-05-06 15:50:57', '2026-05-06 15:50:57'),
(2, 1, 3, '2026-05-06 15:50:57', '2026-05-06 15:50:57');

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

--
-- Table structure for table `agent_payments`
--

CREATE TABLE `agent_payments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `agent_id` bigint(20) UNSIGNED NOT NULL,
  `amount` decimal(14,2) NOT NULL DEFAULT 0.00,
  `method` varchar(255) DEFAULT NULL,
  `trx_id` varchar(255) DEFAULT NULL,
  `paid_at` date DEFAULT NULL,
  `note` text DEFAULT NULL,
  `created_by` 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 `agent_payments`
--

INSERT INTO `agent_payments` (`id`, `agent_id`, `amount`, `method`, `trx_id`, `paid_at`, `note`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 1, 10000000.00, 'Cash', NULL, '2026-05-06', NULL, 1, '2026-05-06 14:47:10', '2026-05-06 14:47:10');

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

--
-- 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
('nurtravelworld-cache-active_visa_slides', 'O:39:\"Illuminate\\Database\\Eloquent\\Collection\":2:{s:8:\"\0*\0items\";a:3:{i:0;O:20:\"App\\Models\\VisaSlide\":33:{s:13:\"\0*\0connection\";s:5:\"mysql\";s:8:\"\0*\0table\";s:11:\"visa_slides\";s:13:\"\0*\0primaryKey\";s:2:\"id\";s:10:\"\0*\0keyType\";s:3:\"int\";s:12:\"incrementing\";b:1;s:7:\"\0*\0with\";a:0:{}s:12:\"\0*\0withCount\";a:0:{}s:19:\"preventsLazyLoading\";b:0;s:10:\"\0*\0perPage\";i:15;s:6:\"exists\";b:1;s:18:\"wasRecentlyCreated\";b:0;s:28:\"\0*\0escapeWhenCastingToString\";b:0;s:13:\"\0*\0attributes\";a:4:{s:2:\"id\";i:2;s:5:\"title\";N;s:10:\"image_path\";s:46:\"uploads/sliders/20260227172624_AendT4ztYp.jpeg\";s:10:\"sort_order\";i:1;}s:11:\"\0*\0original\";a:4:{s:2:\"id\";i:2;s:5:\"title\";N;s:10:\"image_path\";s:46:\"uploads/sliders/20260227172624_AendT4ztYp.jpeg\";s:10:\"sort_order\";i:1;}s:10:\"\0*\0changes\";a:0:{}s:11:\"\0*\0previous\";a:0:{}s:8:\"\0*\0casts\";a:2:{s:9:\"is_active\";s:7:\"boolean\";s:10:\"sort_order\";s:7:\"integer\";}s:17:\"\0*\0classCastCache\";a:0:{}s:21:\"\0*\0attributeCastCache\";a:0:{}s:13:\"\0*\0dateFormat\";N;s:10:\"\0*\0appends\";a:0:{}s:19:\"\0*\0dispatchesEvents\";a:0:{}s:14:\"\0*\0observables\";a:0:{}s:12:\"\0*\0relations\";a:0:{}s:10:\"\0*\0touches\";a:0:{}s:27:\"\0*\0relationAutoloadCallback\";N;s:26:\"\0*\0relationAutoloadContext\";N;s:10:\"timestamps\";b:1;s:13:\"usesUniqueIds\";b:0;s:9:\"\0*\0hidden\";a:0:{}s:10:\"\0*\0visible\";a:0:{}s:11:\"\0*\0fillable\";a:4:{i:0;s:5:\"title\";i:1;s:10:\"image_path\";i:2;s:9:\"is_active\";i:3;s:10:\"sort_order\";}s:10:\"\0*\0guarded\";a:1:{i:0;s:1:\"*\";}}i:1;O:20:\"App\\Models\\VisaSlide\":33:{s:13:\"\0*\0connection\";s:5:\"mysql\";s:8:\"\0*\0table\";s:11:\"visa_slides\";s:13:\"\0*\0primaryKey\";s:2:\"id\";s:10:\"\0*\0keyType\";s:3:\"int\";s:12:\"incrementing\";b:1;s:7:\"\0*\0with\";a:0:{}s:12:\"\0*\0withCount\";a:0:{}s:19:\"preventsLazyLoading\";b:0;s:10:\"\0*\0perPage\";i:15;s:6:\"exists\";b:1;s:18:\"wasRecentlyCreated\";b:0;s:28:\"\0*\0escapeWhenCastingToString\";b:0;s:13:\"\0*\0attributes\";a:4:{s:2:\"id\";i:1;s:5:\"title\";N;s:10:\"image_path\";s:46:\"uploads/sliders/20260227172631_9cUmpuZQ6K.jpeg\";s:10:\"sort_order\";i:2;}s:11:\"\0*\0original\";a:4:{s:2:\"id\";i:1;s:5:\"title\";N;s:10:\"image_path\";s:46:\"uploads/sliders/20260227172631_9cUmpuZQ6K.jpeg\";s:10:\"sort_order\";i:2;}s:10:\"\0*\0changes\";a:0:{}s:11:\"\0*\0previous\";a:0:{}s:8:\"\0*\0casts\";a:2:{s:9:\"is_active\";s:7:\"boolean\";s:10:\"sort_order\";s:7:\"integer\";}s:17:\"\0*\0classCastCache\";a:0:{}s:21:\"\0*\0attributeCastCache\";a:0:{}s:13:\"\0*\0dateFormat\";N;s:10:\"\0*\0appends\";a:0:{}s:19:\"\0*\0dispatchesEvents\";a:0:{}s:14:\"\0*\0observables\";a:0:{}s:12:\"\0*\0relations\";a:0:{}s:10:\"\0*\0touches\";a:0:{}s:27:\"\0*\0relationAutoloadCallback\";N;s:26:\"\0*\0relationAutoloadContext\";N;s:10:\"timestamps\";b:1;s:13:\"usesUniqueIds\";b:0;s:9:\"\0*\0hidden\";a:0:{}s:10:\"\0*\0visible\";a:0:{}s:11:\"\0*\0fillable\";a:4:{i:0;s:5:\"title\";i:1;s:10:\"image_path\";i:2;s:9:\"is_active\";i:3;s:10:\"sort_order\";}s:10:\"\0*\0guarded\";a:1:{i:0;s:1:\"*\";}}i:2;O:20:\"App\\Models\\VisaSlide\":33:{s:13:\"\0*\0connection\";s:5:\"mysql\";s:8:\"\0*\0table\";s:11:\"visa_slides\";s:13:\"\0*\0primaryKey\";s:2:\"id\";s:10:\"\0*\0keyType\";s:3:\"int\";s:12:\"incrementing\";b:1;s:7:\"\0*\0with\";a:0:{}s:12:\"\0*\0withCount\";a:0:{}s:19:\"preventsLazyLoading\";b:0;s:10:\"\0*\0perPage\";i:15;s:6:\"exists\";b:1;s:18:\"wasRecentlyCreated\";b:0;s:28:\"\0*\0escapeWhenCastingToString\";b:0;s:13:\"\0*\0attributes\";a:4:{s:2:\"id\";i:3;s:5:\"title\";N;s:10:\"image_path\";s:46:\"uploads/sliders/20260227085128_63pFle8chr.jpeg\";s:10:\"sort_order\";i:3;}s:11:\"\0*\0original\";a:4:{s:2:\"id\";i:3;s:5:\"title\";N;s:10:\"image_path\";s:46:\"uploads/sliders/20260227085128_63pFle8chr.jpeg\";s:10:\"sort_order\";i:3;}s:10:\"\0*\0changes\";a:0:{}s:11:\"\0*\0previous\";a:0:{}s:8:\"\0*\0casts\";a:2:{s:9:\"is_active\";s:7:\"boolean\";s:10:\"sort_order\";s:7:\"integer\";}s:17:\"\0*\0classCastCache\";a:0:{}s:21:\"\0*\0attributeCastCache\";a:0:{}s:13:\"\0*\0dateFormat\";N;s:10:\"\0*\0appends\";a:0:{}s:19:\"\0*\0dispatchesEvents\";a:0:{}s:14:\"\0*\0observables\";a:0:{}s:12:\"\0*\0relations\";a:0:{}s:10:\"\0*\0touches\";a:0:{}s:27:\"\0*\0relationAutoloadCallback\";N;s:26:\"\0*\0relationAutoloadContext\";N;s:10:\"timestamps\";b:1;s:13:\"usesUniqueIds\";b:0;s:9:\"\0*\0hidden\";a:0:{}s:10:\"\0*\0visible\";a:0:{}s:11:\"\0*\0fillable\";a:4:{i:0;s:5:\"title\";i:1;s:10:\"image_path\";i:2;s:9:\"is_active\";i:3;s:10:\"sort_order\";}s:10:\"\0*\0guarded\";a:1:{i:0;s:1:\"*\";}}}s:28:\"\0*\0escapeWhenCastingToString\";b:0;}', 1778104823);

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

--
-- 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 `candidates`
--

CREATE TABLE `candidates` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `full_name` varchar(255) NOT NULL,
  `father_name` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `passport_no` varchar(255) NOT NULL,
  `photo_path` varchar(255) DEFAULT NULL,
  `passport_file_path` varchar(255) DEFAULT NULL,
  `nationality` varchar(255) DEFAULT NULL,
  `destination_country` varchar(255) NOT NULL DEFAULT 'Saudi Arabia',
  `agent_id` bigint(20) UNSIGNED DEFAULT NULL,
  `company_id` bigint(20) UNSIGNED DEFAULT NULL,
  `company_name` varchar(255) DEFAULT NULL,
  `agent_name` varchar(255) DEFAULT NULL,
  `public_track_token` varchar(80) DEFAULT NULL,
  `track_allowed` tinyint(1) NOT NULL DEFAULT 0,
  `note` text DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` 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 `candidates`
--

INSERT INTO `candidates` (`id`, `full_name`, `father_name`, `phone`, `passport_no`, `photo_path`, `passport_file_path`, `nationality`, `destination_country`, `agent_id`, `company_id`, `company_name`, `agent_name`, `public_track_token`, `track_allowed`, `note`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`) VALUES
(1, 'kamrul hasan', 'abul kalam', '+8801762298533', 'B00604523', 'candidates/photos/8hwuwGso9z8QYMjTmT9vgH40a2oxP9lSUZx0XfdA.png', 'candidates/passports/INBpwPRodBeRqlCBc1ApoLyolfRq077f9d6uYTv8.jpg', 'Bangladesh', 'spain', 1, NULL, NULL, 'kamrul hasan bd', '94efb85f03ea11f1b1584cedfb79f3a0', 1, 'all okk', 'active', 1, NULL, '2026-02-06 13:06:46', '2026-05-06 10:22:13'),
(2, 'adv. rabiullah', 'rahim', '+8801762298533', 'A00423567', 'candidates/photos/lXUc8T2n2DL4w3hYAnyL9AqVFcwrRRdW71StSNar.png', 'candidates/passports/z2SlNNkI8YHIoyCWiO1vI6aZ5ftzxbuBzL4wd0U9.jpg', 'Bangladesh', 'Franch', 1, NULL, NULL, 'kamrul hasan bd', '94efc9fc03ea11f1b1584cedfb79f3a0', 1, NULL, 'active', 1, NULL, '2026-02-06 13:20:59', '2026-05-15 01:44:50'),
(3, 'kamrul hasan', 'abul kalam', '+8801762298533', 'B00604524', NULL, NULL, 'Bangladesh', 'spain', 1, NULL, NULL, 'kamrul hasan bd', 'AoGea4n0Jt2cBDdFTYoS1y4y1yXNc3eQS2Q9Cgc57RmUtuEO0r0rMNrDeKbo', 1, NULL, 'active', 1, NULL, '2026-02-27 02:39:41', '2026-05-15 01:44:48'),
(4, 'kamrul hasan', 'abul kalam', '+8801762298533', 'B00604525', NULL, NULL, 'Bangladesh', 'Saudi Arabia', NULL, NULL, NULL, NULL, 'CUZyjQ7AASLLH9zZbKcpUVl5Rgoim1thBZHiDdzw0CRj1ZnlAfjRlaKxJH8b', 1, NULL, 'active', 1, NULL, '2026-02-27 03:03:26', '2026-05-15 01:44:46'),
(5, 'kamrul hasan', 'abul kalam', '+8801762298533', 'B00604526', NULL, NULL, 'Bangladesh', 'Saudi Arabia', 1, NULL, NULL, 'kamrul hasan bd', 'ZHtuJGS5XKKmMzNXZD2DBP526MatCT9VViVOlkSx4QtTccgCuKshzoQxiERj', 1, NULL, 'active', 1, NULL, '2026-02-27 05:17:57', '2026-05-15 01:44:45'),
(6, 'kamrul hasan', 'abul kalam', '+8801762298533', 'B00604527', NULL, NULL, 'Bangladesh', 'Saudi Arabia', 1, NULL, NULL, 'kamrul hasan bd', 'NFNTBUz6wzPlGUrppz2hdsISMHBVQ3oiSniKkBsDe18iuGyWgKCSL41D4Dix', 1, NULL, 'active', 1, NULL, '2026-02-27 05:20:17', '2026-05-15 01:44:40'),
(7, 'kamrul hasan', 'abul kalam', '+8801762298533', 'B00604528', NULL, NULL, 'Bangladesh', 'Saudi Arabia', 1, 3, 'rohol new', 'kamrul hasan bd', 'MZwelRJALbKMvr65CZ3Ih8zA8DMCSnpabKswNMTzPZGEbQnS5wRKGk4giUHt', 1, NULL, 'active', 1, NULL, '2026-02-27 05:23:12', '2026-05-06 10:36:01'),
(8, 'kayma back office', NULL, '+8801929161279', 'A00423563', NULL, NULL, 'Bangladesh', 'nepal', 1, 2, 'nur travel', 'kamrul hasan bd', '1kSJqOAE0FDwz4mKlvJO6aTlgMCHdB9dIGeFFGWBo56BIEhKEPjVkq7bubsD', 1, NULL, 'active', 1, NULL, '2026-04-20 23:35:46', '2026-05-06 11:41:21'),
(9, 'kamrul hasan', 'abul kalam', '+880176229852', 'B00604512', NULL, NULL, 'Bangladesh', 'Saudi Arabia', 1, 3, 'rohol new', 'kamrul hasan bd', 'NkHtt8SZVBgzco76ixBudA4ge0vKhNf8UwFMmjQX9KKCjRV1RCqy7ixn3oeJ', 1, NULL, 'active', 1, NULL, '2026-05-06 11:44:58', '2026-05-15 01:44:42'),
(10, 'kamrul hasan', 'abul kalam', '+880176229852', 'B006045112', NULL, NULL, 'Bangladesh', 'Saudi Arabia', 1, 3, 'rohol new', 'kamrul hasan bd', 'YK3seoXhR6m4k2EZo9xl2MBmSti259IsN1vmtBNQsUlGdq0C83pAG54Yq43Z', 1, NULL, 'active', 1, NULL, '2026-05-06 11:50:37', '2026-05-06 11:50:37'),
(11, 'uptoo', 'yyyyyyyyy', '+8801929161265', 'B00604556', 'candidates/photos/AXQksBraT9nIDnVoJg63JlUrkVlizi2kTFnKmvav.jpg', NULL, 'Bangladeshi', 'Saudi Arabia', 1, 1, 'rohol', 'kamrul hasan bd', 'NRm8Z58grfjqcTxhR39BxBHmFQzePOMmgJcF5kkRNKPrfpXu8SydzsuvyZnY', 1, NULL, 'active', 7, NULL, '2026-05-15 02:03:54', '2026-05-15 02:04:54'),
(12, 'testt', 'tesstt23', '+880192916123', 'B00604578', 'candidates/photos/cwiktPM1iMlKNfOiRYekDS4XFwDjC7G5mmpuSHLn.jpg', NULL, 'Bangladeshi', 'Qatar', 1, 3, 'rohol new', 'kamrul hasan bd', 'av8RIDngQ2trTjMWKU3IX4Oj8POPqOOM2RxsHlutH9GDBr0zT5ykaafcbEQb', 1, NULL, 'active', 7, 1, '2026-05-15 02:16:01', '2026-05-15 03:55:28');

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

--
-- Table structure for table `case_steps`
--

CREATE TABLE `case_steps` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `recruitment_case_id` bigint(20) UNSIGNED NOT NULL,
  `step_id` bigint(20) UNSIGNED NOT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'pending',
  `note` text DEFAULT NULL,
  `done_at` datetime DEFAULT NULL,
  `done_by` 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 `case_steps`
--

INSERT INTO `case_steps` (`id`, `recruitment_case_id`, `step_id`, `status`, `note`, `done_at`, `done_by`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'done', NULL, NULL, 1, '2026-02-06 13:08:00', '2026-02-06 13:08:00'),
(2, 1, 5, 'pending', 'they are update at 10/07/2026', '2026-02-07 01:13:00', 1, '2026-02-06 13:14:18', '2026-02-06 13:14:18'),
(3, 1, 5, 'done', NULL, '2026-07-10 01:15:00', 1, '2026-02-06 13:15:46', '2026-02-06 13:15:46'),
(4, 2, 1, 'done', NULL, '2026-02-06 01:21:00', 1, '2026-02-06 13:21:34', '2026-02-06 13:21:34'),
(5, 2, 2, 'done', NULL, '2026-02-07 01:21:00', 1, '2026-02-06 13:21:54', '2026-02-06 13:21:54'),
(6, 2, 3, 'done', NULL, '2026-02-08 01:22:00', 1, '2026-02-06 13:22:05', '2026-02-06 13:22:05'),
(7, 2, 4, 'done', NULL, '2026-02-09 01:22:00', 1, '2026-02-06 13:22:20', '2026-02-06 13:22:20'),
(8, 2, 5, 'done', NULL, '2026-02-10 01:22:00', 1, '2026-02-06 13:22:30', '2026-02-06 13:22:30'),
(9, 2, 6, 'done', NULL, '2026-02-11 01:22:00', 1, '2026-02-06 13:22:50', '2026-02-06 13:22:50'),
(10, 2, 7, 'done', NULL, '2026-02-11 01:22:00', 1, '2026-02-06 13:22:56', '2026-02-06 13:22:56'),
(11, 2, 8, 'done', NULL, '2026-02-11 01:23:00', 1, '2026-02-06 13:23:09', '2026-02-06 13:23:09'),
(12, 1, 13, 'done', NULL, '2026-02-07 01:42:00', 1, '2026-02-06 13:42:51', '2026-02-06 13:42:51'),
(13, 1, 14, 'done', NULL, '2026-02-08 01:42:00', 1, '2026-02-06 13:42:59', '2026-02-06 13:42:59'),
(14, 1, 10, 'done', NULL, '2026-02-09 01:43:00', 1, '2026-02-06 13:43:07', '2026-02-06 13:43:07'),
(15, 1, 12, 'done', NULL, '2026-02-10 01:43:00', 1, '2026-02-06 13:43:20', '2026-02-06 13:43:20'),
(16, 1, 9, 'done', NULL, '2026-02-11 01:43:00', 1, '2026-02-06 13:43:35', '2026-02-06 13:43:35'),
(17, 1, 14, 'done', NULL, '2026-02-12 01:43:00', 1, '2026-02-06 13:43:47', '2026-02-06 13:43:47'),
(18, 2, 10, 'done', 'rafik niye geche', '2026-02-07 11:17:00', 1, '2026-02-06 23:17:43', '2026-02-06 23:17:43'),
(19, 2, 9, 'done', NULL, '2026-02-10 02:14:00', 1, '2026-02-10 14:14:16', '2026-02-10 14:14:16'),
(20, 2, 6, 'done', NULL, NULL, 1, '2026-02-27 02:21:12', '2026-02-27 02:21:12'),
(21, 2, 10, 'done', NULL, NULL, 1, '2026-02-27 02:21:36', '2026-02-27 02:21:36'),
(22, 2, 3, 'done', NULL, NULL, 1, '2026-02-27 02:34:58', '2026-02-27 02:34:58'),
(23, 7, 1, 'done', NULL, '2026-02-27 17:24:00', 1, '2026-02-27 05:24:15', '2026-02-27 05:24:15'),
(24, 7, 10, 'done', NULL, '2026-02-26 17:25:00', 1, '2026-02-27 05:25:45', '2026-02-27 05:25:45'),
(25, 7, 7, 'done', NULL, '2026-02-26 23:42:00', 1, '2026-02-27 11:42:38', '2026-02-27 11:42:38'),
(26, 8, 1, 'done', NULL, NULL, 1, '2026-05-06 11:33:47', '2026-05-06 11:33:47'),
(27, 8, 7, 'done', NULL, NULL, 1, '2026-05-06 11:34:12', '2026-05-06 11:34:12'),
(28, 10, 2, 'done', NULL, NULL, 1, '2026-05-06 13:51:19', '2026-05-06 13:51:19'),
(29, 10, 9, 'done', NULL, NULL, 1, '2026-05-15 01:46:18', '2026-05-15 01:46:18'),
(30, 10, 3, 'done', NULL, NULL, 1, '2026-05-15 01:46:33', '2026-05-15 01:46:33');

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

--
-- Table structure for table `companies`
--

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

INSERT INTO `companies` (`id`, `name`, `phone`, `address`, `note`, `status`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 'rohol', NULL, 'dhaka', NULL, 'active', 1, '2026-04-20 23:30:18', '2026-04-20 23:30:18'),
(2, 'nur travel', NULL, 'dhaka', NULL, 'active', 1, '2026-04-20 23:35:09', '2026-04-20 23:35:09'),
(3, 'rohol new', '01762298533', 'dhaka bangladesh', NULL, 'active', 1, '2026-05-06 09:49:25', '2026-05-06 09:49:25');

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

--
-- Table structure for table `expenses`
--

CREATE TABLE `expenses` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `recruitment_case_id` bigint(20) UNSIGNED DEFAULT NULL,
  `title` varchar(255) NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `spent_at` datetime DEFAULT NULL,
  `paid_by` bigint(20) UNSIGNED DEFAULT NULL,
  `note` text 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 `expenses`
--

INSERT INTO `expenses` (`id`, `recruitment_case_id`, `title`, `amount`, `spent_at`, `paid_by`, `note`, `created_at`, `updated_at`) VALUES
(1, 2, 'medi', 10000.00, '2026-02-06 19:46:44', 1, 'ok', '2026-02-06 13:46:44', '2026-02-06 13:46:44'),
(2, 2, 'india', 300000.00, '2026-02-07 05:22:15', 1, 'service fee', '2026-02-06 23:22:15', '2026-02-06 23:22:15');

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

--
-- 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 `file_activities`
--

CREATE TABLE `file_activities` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `candidate_id` bigint(20) UNSIGNED DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(50) NOT NULL DEFAULT 'uploaded',
  `file_type` varchar(100) DEFAULT NULL,
  `original_name` varchar(255) DEFAULT NULL,
  `file_path` varchar(255) DEFAULT NULL,
  `notes` text 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 `file_activities`
--

INSERT INTO `file_activities` (`id`, `candidate_id`, `user_id`, `action`, `file_type`, `original_name`, `file_path`, `notes`, `created_at`, `updated_at`) VALUES
(1, 12, 7, 'updated', 'Candidate Photo', 'nur travel.jpeg', 'candidates/photos/cwiktPM1iMlKNfOiRYekDS4XFwDjC7G5mmpuSHLn.jpg', 'Updated by uptoo', '2026-05-15 02:19:44', '2026-05-15 02:19:44');

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

--
-- 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 `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),
(2, '0001_01_01_000001_create_cache_table', 1),
(3, '0001_01_01_000002_create_jobs_table', 1),
(4, '2026_02_06_180000_create_steps_table', 2),
(5, '2026_02_06_180010_create_candidates_table', 2),
(6, '2026_02_06_180020_create_recruitment_cases_table', 2),
(7, '2026_02_06_180030_create_case_steps_table', 2),
(8, '2026_02_06_180040_create_payments_table', 2),
(9, '2026_02_06_180050_create_expenses_table', 2),
(10, '2026_02_07_000000_create_agents_table', 3),
(11, '2026_02_07_000010_add_agent_id_to_candidates_table', 3),
(12, '2026_02_07_000040_add_role_to_users_table', 4),
(13, '2026_02_07_000050_add_user_id_to_agents_table', 5),
(14, '2026_02_07_000060_add_public_track_token_to_candidates_table', 5),
(15, '2026_02_07_010000_create_staffs_table', 6),
(16, '2026_02_07_010010_create_staff_salaries_table', 6),
(17, '2026_02_07_010020_create_staff_salary_payments_table', 6),
(18, '2026_02_07_010030_add_identity_fields_to_staffs_table', 6),
(19, '2026_02_09_000100_add_upload_fields_to_candidates_table', 6),
(20, '2026_02_09_180000_create_visa_inquiries_table', 6),
(21, '2026_02_10_010000_fix_visa_inquiries_columns', 6),
(22, '2026_02_10_020000_add_passport_fields_to_visa_inquiries', 6),
(23, '2026_02_13_000050_add_permissions_to_users_table', 6),
(24, '2026_02_27_000000_create_visa_slides_table', 6),
(25, '2026_03_01_000000_create_companies_table', 6),
(26, '2026_03_01_000010_add_company_id_to_candidates_table', 6),
(27, '2026_03_01_000020_create_agent_company_table', 6),
(28, '2026_03_02_000000_add_track_allowed_to_candidates_table', 6);

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

--
-- 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 `payments`
--

CREATE TABLE `payments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `recruitment_case_id` bigint(20) UNSIGNED NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `method` varchar(255) NOT NULL DEFAULT 'cash',
  `trx_id` varchar(255) DEFAULT NULL,
  `paid_at` datetime DEFAULT NULL,
  `received_by` bigint(20) UNSIGNED DEFAULT NULL,
  `note` text 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 `payments`
--

INSERT INTO `payments` (`id`, `recruitment_case_id`, `amount`, `method`, `trx_id`, `paid_at`, `received_by`, `note`, `created_at`, `updated_at`) VALUES
(1, 1, 300000.00, 'cash', NULL, '2026-02-06 19:09:08', 1, NULL, '2026-02-06 13:09:08', '2026-02-06 13:09:08'),
(2, 2, 1600000.00, 'cash', NULL, '2026-02-06 19:23:27', 1, NULL, '2026-02-06 13:23:27', '2026-02-06 13:23:27'),
(3, 3, 100000.00, 'bank', NULL, '2026-02-27 08:47:10', 1, NULL, '2026-02-27 02:47:10', '2026-02-27 02:47:10');

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

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

CREATE TABLE `permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(120) NOT NULL,
  `slug` varchar(120) NOT NULL,
  `group_name` varchar(120) 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 `permissions`
--

INSERT INTO `permissions` (`id`, `name`, `slug`, `group_name`, `created_at`, `updated_at`) VALUES
(1, 'Access Dashboard', 'dashboard', 'Admin', '2026-02-13 05:56:49', '2026-02-13 05:56:49'),
(2, 'Manage Candidates', 'candidates', 'Admin', '2026-02-13 05:56:49', '2026-02-13 05:56:49'),
(3, 'Manage Staffs', 'staffs', 'Admin', '2026-02-13 05:56:49', '2026-02-13 05:56:49'),
(4, 'Manage Salaries', 'salaries', 'Admin', '2026-02-13 05:56:49', '2026-02-13 05:56:49'),
(5, 'Manage Agents', 'agents', 'Admin', '2026-02-13 05:56:49', '2026-02-13 05:56:49'),
(6, 'Manage Visa Inquiries', 'visa-inquiries', 'Admin', '2026-02-13 05:56:49', '2026-02-13 05:56:49'),
(7, 'Manage Users', 'users', 'Admin', '2026-02-13 05:56:49', '2026-02-13 05:56:49'),
(8, 'Manage Roles', 'roles', 'Admin', '2026-02-13 05:56:49', '2026-02-13 05:56:49'),
(9, 'Admin Access', 'admin', 'Admin', '2026-02-13 05:56:49', '2026-02-13 05:56:49');

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

--
-- Table structure for table `recruitment_cases`
--

CREATE TABLE `recruitment_cases` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `candidate_id` bigint(20) UNSIGNED NOT NULL,
  `package_price` decimal(12,2) NOT NULL DEFAULT 0.00,
  `discount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_price` decimal(12,2) NOT NULL DEFAULT 0.00,
  `current_step_id` bigint(20) UNSIGNED DEFAULT NULL,
  `is_closed` 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 `recruitment_cases`
--

INSERT INTO `recruitment_cases` (`id`, `candidate_id`, `package_price`, `discount`, `total_price`, `current_step_id`, `is_closed`, `created_at`, `updated_at`) VALUES
(1, 1, 1800000.00, 0.00, 1800000.00, 14, 0, '2026-02-06 13:06:46', '2026-02-06 13:43:47'),
(2, 2, 2000000.00, 200000.00, 1800000.00, 3, 0, '2026-02-06 13:20:59', '2026-02-27 02:34:58'),
(3, 3, 2000000.00, 100000.00, 1900000.00, NULL, 0, '2026-02-27 02:39:41', '2026-02-27 02:46:27'),
(4, 4, 0.00, 0.00, 0.00, NULL, 0, '2026-02-27 03:03:26', '2026-02-27 03:03:26'),
(5, 5, 2000000.00, 0.00, 2000000.00, NULL, 0, '2026-02-27 05:17:57', '2026-02-27 05:17:57'),
(6, 6, 2000000.00, 0.00, 2000000.00, NULL, 0, '2026-02-27 05:20:17', '2026-02-27 05:20:17'),
(7, 7, 2000000.00, 0.00, 2000000.00, 7, 0, '2026-02-27 05:23:12', '2026-02-27 11:42:38'),
(8, 8, 0.00, 0.00, 0.00, 7, 0, '2026-04-20 23:35:46', '2026-05-06 11:34:12'),
(9, 9, 0.00, 0.00, 0.00, NULL, 0, '2026-05-06 11:44:58', '2026-05-06 11:44:58'),
(10, 10, 1200000.00, 0.00, 1200000.00, 3, 0, '2026-05-06 11:50:37', '2026-05-15 01:46:33'),
(11, 11, 0.00, 0.00, 0.00, NULL, 0, '2026-05-15 02:03:54', '2026-05-15 02:03:54'),
(12, 12, 0.00, 0.00, 0.00, NULL, 0, '2026-05-15 02:16:01', '2026-05-15 02:16:01');

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

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

CREATE TABLE `roles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(100) NOT NULL,
  `slug` varchar(100) NOT NULL,
  `permissions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`permissions`)),
  `description` varchar(255) 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 `roles`
--

INSERT INTO `roles` (`id`, `name`, `slug`, `permissions`, `description`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'admin', '[\"admin.access\",\"admin.dashboard\",\"admin.candidates\",\"admin.cases\",\"admin.finances\",\"admin.staffs\",\"admin.salaries\",\"admin.agents\",\"admin.visa_inquiries\",\"admin.users\",\"admin.roles\"]', 'Full access', '2026-02-13 05:56:49', '2026-02-13 00:14:31'),
(2, 'Agent', 'agent', '[]', 'Agent panel access', '2026-02-13 06:04:38', '2026-02-13 06:04:38'),
(7, 'Staff', 'staff', '[\"admin.access\",\"admin.dashboard\"]', NULL, '2026-02-13 00:36:39', '2026-02-13 00:36:39'),
(8, 'Dashboard', 'dashboard', '[\"admin.dashboard\"]', NULL, '2026-02-13 00:36:57', '2026-02-13 00:36:57'),
(9, 'Payments & Expenses', 'payments-expenses', '[]', NULL, '2026-02-13 00:37:03', '2026-02-13 00:37:03'),
(10, 'Candidates', 'candidates', '[]', NULL, '2026-02-13 00:37:12', '2026-02-13 00:37:12'),
(11, 'Recruitment Cases', 'recruitment-cases', '[]', NULL, '2026-02-13 00:37:20', '2026-02-13 00:37:20'),
(12, 'Salaries', 'salaries', '[]', NULL, '2026-02-13 00:37:26', '2026-02-13 00:37:26'),
(13, 'Visa Inquiries', 'visa-inquiries', '[]', NULL, '2026-02-13 00:37:32', '2026-02-13 00:37:32'),
(14, 'admin.users', 'adminusers', '[]', NULL, '2026-02-13 00:37:52', '2026-02-13 00:37:52'),
(15, 'Admin Panel Access', 'admin-panel-access', '[]', NULL, '2026-02-13 00:37:59', '2026-02-13 00:37:59');

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

--
-- Table structure for table `role_permission`
--

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

--
-- Dumping data for table `role_permission`
--

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

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

--
-- 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
('6Nd7nB4ojSkgQrS1gwVioAtVBCCWbPCLkpXgvNcu', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiOFFodUluVnRGdTZVSTBKdnJwVk4zUTh6WWdhQ3hqRThvN0lYWk9rdiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6Mjc6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9sb2dpbiI7czo1OiJyb3V0ZSI7czo1OiJsb2dpbiI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1778097815),
('NbgGksn1zzVG2SWZ43o6dFdCmLt4gzbh8TJQdcQv', 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', 'YTo1OntzOjY6Il90b2tlbiI7czo0MDoiRDBFMmNneWFuYXJxSk8wRFpsQlE5cHY3UHRBRm5WMXlZU2hlT0ZoUCI7czozOiJ1cmwiO2E6MDp7fXM6OToiX3ByZXZpb3VzIjthOjI6e3M6MzoidXJsIjtzOjYwOiJodHRwOi8vMTI3LjAuMC4xOjgwMDAvYWRtaW4vY2FuZGlkYXRlcy9leHBvcnQvcGRmP2FnZW50X2lkPTEiO3M6NToicm91dGUiO3M6Mjc6ImFkbWluLmNhbmRpZGF0ZXMuZXhwb3J0LnBkZiI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fXM6NTA6ImxvZ2luX3dlYl81OWJhMzZhZGRjMmIyZjk0MDE1ODBmMDE0YzdmNThlYTRlMzA5ODlkIjtpOjE7fQ==', 1778097870),
('U8anuAb63U3whdhpNOTECyJNV5hIlpRpvAZkz3DJ', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36 Edg/147.0.0.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiU2Vxdmtya21UcEZtYzYxQU9VTnRpNmRwTTJybUZhSER6TUlHWnBEayI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7czo1OiJyb3V0ZSI7czo0OiJob21lIjt9fQ==', 1778104277);

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

--
-- Table structure for table `staffs`
--

CREATE TABLE `staffs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `father_name` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `designation` varchar(255) DEFAULT NULL,
  `joining_date` date DEFAULT NULL,
  `nid_no` varchar(255) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `base_salary` decimal(12,2) NOT NULL DEFAULT 0.00,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `created_by` 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 `staffs`
--

INSERT INTO `staffs` (`id`, `name`, `father_name`, `phone`, `email`, `designation`, `joining_date`, `nid_no`, `address`, `base_salary`, `status`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 'kamrul hasan', 'abul kalam', '+8801929161279', 'kamrul@nurtravelworld.com', 'cto', '2026-01-01', NULL, 'cumilla', 50000.00, 'active', 1, '2026-02-07 01:52:44', '2026-02-07 01:52:44');

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

--
-- Table structure for table `staff_salaries`
--

CREATE TABLE `staff_salaries` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `staff_id` bigint(20) UNSIGNED NOT NULL,
  `month` char(7) NOT NULL,
  `basic_salary` decimal(12,2) NOT NULL DEFAULT 0.00,
  `allowance` decimal(12,2) NOT NULL DEFAULT 0.00,
  `deduction` decimal(12,2) NOT NULL DEFAULT 0.00,
  `net_salary` decimal(12,2) NOT NULL DEFAULT 0.00,
  `paid_amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `status` varchar(255) NOT NULL DEFAULT 'unpaid',
  `generated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `note` text 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 `staff_salaries`
--

INSERT INTO `staff_salaries` (`id`, `staff_id`, `month`, `basic_salary`, `allowance`, `deduction`, `net_salary`, `paid_amount`, `status`, `generated_by`, `note`, `created_at`, `updated_at`) VALUES
(1, 1, '2026-02', 50000.00, 0.00, 0.00, 50000.00, 50000.00, 'paid', 1, NULL, '2026-02-07 01:52:49', '2026-02-07 01:53:23');

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

--
-- Table structure for table `staff_salary_payments`
--

CREATE TABLE `staff_salary_payments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `staff_salary_id` bigint(20) UNSIGNED NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `paid_on` date DEFAULT NULL,
  `method` varchar(255) DEFAULT NULL,
  `note` text DEFAULT NULL,
  `received_by` 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 `staff_salary_payments`
--

INSERT INTO `staff_salary_payments` (`id`, `staff_salary_id`, `amount`, `paid_on`, `method`, `note`, `received_by`, `created_at`, `updated_at`) VALUES
(1, 1, 40000.00, '2026-02-07', NULL, NULL, 1, '2026-02-07 01:53:05', '2026-02-07 01:53:05'),
(2, 1, 10000.00, '2026-02-07', NULL, NULL, 1, '2026-02-07 01:53:23', '2026-02-07 01:53:23');

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

--
-- Table structure for table `steps`
--

CREATE TABLE `steps` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `sort_order` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `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 `steps`
--

INSERT INTO `steps` (`id`, `name`, `sort_order`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'Passport Received', 15, 1, '2026-02-06 12:08:24', '2026-02-06 13:41:22'),
(2, 'Medical', 2, 1, '2026-02-06 12:08:24', '2026-02-06 12:08:24'),
(3, 'Biometric', 3, 1, '2026-02-06 12:08:24', '2026-02-06 12:08:24'),
(4, 'BMET/MOFA', 4, 1, '2026-02-06 12:08:24', '2026-02-06 12:08:24'),
(5, 'Visa Stamping', 11, 1, '2026-02-06 12:08:24', '2026-02-06 13:41:22'),
(6, 'Ticket', 12, 1, '2026-02-06 12:08:24', '2026-02-06 13:41:22'),
(7, 'Ready to Fly', 13, 1, '2026-02-06 12:08:24', '2026-02-06 13:41:22'),
(8, 'Departed', 14, 1, '2026-02-06 12:08:24', '2026-02-06 13:41:22'),
(9, 'Passport Collected', 1, 1, '2026-02-06 13:41:22', '2026-02-06 13:41:22'),
(10, 'Sent to India', 5, 1, '2026-02-06 13:41:22', '2026-02-06 13:41:22'),
(11, 'Submitted to Embassy', 6, 1, '2026-02-06 13:41:22', '2026-02-06 13:41:22'),
(12, 'Visa Application Submitted', 7, 1, '2026-02-06 13:41:22', '2026-02-06 13:41:22'),
(13, 'Visa In Process', 8, 1, '2026-02-06 13:41:22', '2026-02-06 13:41:22'),
(14, 'Visa Approved', 9, 1, '2026-02-06 13:41:22', '2026-02-06 13:41:22'),
(15, 'Visa Refused', 10, 1, '2026-02-06 13:41:22', '2026-02-06 13:41:22'),
(16, 'Approved', 10, 1, '2026-02-06 13:41:22', '2026-02-06 13:41:22');

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

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

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `role` varchar(255) NOT NULL DEFAULT 'admin',
  `permissions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`permissions`)),
  `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`, `email_verified_at`, `password`, `role`, `permissions`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'admin@nurtravelworld.com', NULL, '$2y$12$a5szx42IEu7lXWrxb9jOK.uoe7nlSi8tyz4aZQjwlv2r8Cuqmhsgi', 'admin', NULL, NULL, '2026-02-06 12:08:24', '2026-02-09 22:26:28'),
(3, 'kamrul hasan bd', 'kamrul@nurtravelworld.com', NULL, '$2y$12$lutfVpi/MpQ/vEDFC0UD.eWvv14XJURrnVzp.zGV73/KKdMsQHO2i', 'agent', NULL, NULL, '2026-02-07 00:03:38', '2026-02-27 02:34:41'),
(6, 'Md. Rahim Uddin', 'nirliptobd@gmail.com', NULL, '$2y$12$KddhAv5EILzmecoTIiO7.Op8.tnrKU1XfyL/2inBzvfvXyZEJ8306', 'staff', '[\"candidates\",\"staff\",\"salaries\"]', NULL, '2026-02-13 12:22:23', '2026-02-13 12:37:30'),
(7, 'uptoo', 'uptoo@nurtravelworld.com', NULL, '$2y$12$lo5mG7dSMOds0rVLnrqtHuRz1Ee6Rr0oIuVKiDGriYQy24oNXY85C', 'staff', '[\"candidates\"]', NULL, '2026-02-13 12:39:25', '2026-05-15 02:09:09');

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

--
-- Table structure for table `user_role`
--

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

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

--
-- Table structure for table `visa_inquiries`
--

CREATE TABLE `visa_inquiries` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `citizenship_country` varchar(255) NOT NULL,
  `destination_country` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `date_of_birth` date DEFAULT NULL,
  `passport_number` varchar(60) DEFAULT NULL,
  `applicant_image_path` varchar(255) DEFAULT NULL,
  `passport_file_path` varchar(255) DEFAULT NULL,
  `travel_date` date DEFAULT NULL,
  `message` text DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'new',
  `ip_address` varchar(255) DEFAULT NULL,
  `user_agent` text 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 `visa_inquiries`
--

INSERT INTO `visa_inquiries` (`id`, `user_id`, `citizenship_country`, `destination_country`, `name`, `email`, `phone`, `date_of_birth`, `passport_number`, `applicant_image_path`, `passport_file_path`, `travel_date`, `message`, `status`, `ip_address`, `user_agent`, `created_at`, `updated_at`) VALUES
(4, 1, 'Bangladesh', 'Serbia', 'kamrul hasan bd', 'nirliptobd@gmail.com', '01929161279', '1998-01-04', 'B00604523', 'visa_inquiries/applicant_photos/20260210_054014_EBXWZiufHC.png', 'visa_inquiries/passports/20260210_054014_oD56NhPrrj.jpeg', '2026-04-22', NULL, 'contacted', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36 Edg/144.0.0.0', '2026-02-09 23:40:14', '2026-02-09 23:41:25'),
(5, NULL, 'Albania', 'Anguilla', 'kamrul hasan bd', 'nirliptobd@gmail.com', '01929161279', '1998-01-04', 'B00604523', NULL, NULL, '2026-04-22', NULL, 'new', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36 Edg/144.0.0.0', '2026-02-14 02:34:48', '2026-02-14 02:34:48');

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

--
-- Table structure for table `visa_slides`
--

CREATE TABLE `visa_slides` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) DEFAULT NULL,
  `caption` varchar(255) DEFAULT NULL,
  `image_path` varchar(255) NOT NULL,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `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 `visa_slides`
--

INSERT INTO `visa_slides` (`id`, `title`, `caption`, `image_path`, `sort_order`, `is_active`, `created_at`, `updated_at`) VALUES
(1, NULL, NULL, 'uploads/sliders/20260227172631_9cUmpuZQ6K.jpeg', 2, 1, '2026-02-26 12:35:19', '2026-02-27 11:26:31'),
(2, NULL, NULL, 'uploads/sliders/20260227172624_AendT4ztYp.jpeg', 1, 1, '2026-02-26 12:37:39', '2026-02-27 11:26:24'),
(3, NULL, NULL, 'uploads/sliders/20260227085128_63pFle8chr.jpeg', 3, 1, '2026-02-26 15:11:56', '2026-02-27 02:51:28');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `agents`
--
ALTER TABLE `agents`
  ADD PRIMARY KEY (`id`),
  ADD KEY `agents_created_by_foreign` (`created_by`),
  ADD KEY `agents_name_index` (`name`),
  ADD KEY `agents_user_id_index` (`user_id`);

--
-- Indexes for table `agent_company`
--
ALTER TABLE `agent_company`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `agent_company_agent_id_company_id_unique` (`agent_id`,`company_id`),
  ADD KEY `agent_company_company_id_foreign` (`company_id`);

--
-- Indexes for table `agent_payments`
--
ALTER TABLE `agent_payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `agent_payments_agent_id_foreign` (`agent_id`),
  ADD KEY `agent_payments_created_by_foreign` (`created_by`);

--
-- 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 `candidates`
--
ALTER TABLE `candidates`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `candidates_passport_no_unique` (`passport_no`),
  ADD UNIQUE KEY `candidates_public_track_token_unique` (`public_track_token`),
  ADD KEY `candidates_created_by_foreign` (`created_by`),
  ADD KEY `candidates_agent_id_foreign` (`agent_id`),
  ADD KEY `candidates_company_id_foreign` (`company_id`);

--
-- Indexes for table `case_steps`
--
ALTER TABLE `case_steps`
  ADD PRIMARY KEY (`id`),
  ADD KEY `case_steps_recruitment_case_id_foreign` (`recruitment_case_id`),
  ADD KEY `case_steps_step_id_foreign` (`step_id`),
  ADD KEY `case_steps_done_by_foreign` (`done_by`);

--
-- Indexes for table `companies`
--
ALTER TABLE `companies`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `companies_name_unique` (`name`),
  ADD KEY `companies_created_by_foreign` (`created_by`);

--
-- Indexes for table `expenses`
--
ALTER TABLE `expenses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `expenses_recruitment_case_id_foreign` (`recruitment_case_id`),
  ADD KEY `expenses_paid_by_foreign` (`paid_by`);

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

--
-- Indexes for table `file_activities`
--
ALTER TABLE `file_activities`
  ADD PRIMARY KEY (`id`),
  ADD KEY `file_activities_candidate_id_index` (`candidate_id`),
  ADD KEY `file_activities_user_id_index` (`user_id`);

--
-- 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 `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

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

--
-- Indexes for table `payments`
--
ALTER TABLE `payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `payments_recruitment_case_id_foreign` (`recruitment_case_id`),
  ADD KEY `payments_received_by_foreign` (`received_by`);

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

--
-- Indexes for table `recruitment_cases`
--
ALTER TABLE `recruitment_cases`
  ADD PRIMARY KEY (`id`),
  ADD KEY `recruitment_cases_candidate_id_foreign` (`candidate_id`),
  ADD KEY `recruitment_cases_current_step_id_foreign` (`current_step_id`);

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

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

--
-- 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 `staffs`
--
ALTER TABLE `staffs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `staffs_name_index` (`name`),
  ADD KEY `staffs_status_index` (`status`),
  ADD KEY `staffs_created_by_foreign` (`created_by`);

--
-- Indexes for table `staff_salaries`
--
ALTER TABLE `staff_salaries`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `staff_salaries_staff_id_month_unique` (`staff_id`,`month`),
  ADD KEY `staff_salaries_month_index` (`month`),
  ADD KEY `staff_salaries_status_index` (`status`),
  ADD KEY `staff_salaries_staff_id_foreign` (`staff_id`),
  ADD KEY `staff_salaries_generated_by_foreign` (`generated_by`);

--
-- Indexes for table `staff_salary_payments`
--
ALTER TABLE `staff_salary_payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `staff_salary_payments_paid_on_index` (`paid_on`),
  ADD KEY `staff_salary_payments_staff_salary_id_foreign` (`staff_salary_id`),
  ADD KEY `staff_salary_payments_received_by_foreign` (`received_by`);

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

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

--
-- Indexes for table `user_role`
--
ALTER TABLE `user_role`
  ADD PRIMARY KEY (`user_id`,`role_id`),
  ADD KEY `fk_ur_role` (`role_id`);

--
-- Indexes for table `visa_inquiries`
--
ALTER TABLE `visa_inquiries`
  ADD PRIMARY KEY (`id`),
  ADD KEY `visa_inquiries_status_created_at_index` (`status`,`created_at`),
  ADD KEY `visa_inquiries_user_id_index` (`user_id`);

--
-- Indexes for table `visa_slides`
--
ALTER TABLE `visa_slides`
  ADD PRIMARY KEY (`id`),
  ADD KEY `visa_slides_is_active_index` (`is_active`),
  ADD KEY `visa_slides_sort_order_index` (`sort_order`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `expenses`
--
ALTER TABLE `expenses`
  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 `file_activities`
--
ALTER TABLE `file_activities`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `agents`
--
ALTER TABLE `agents`
  ADD CONSTRAINT `agents_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `agents_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `agent_company`
--
ALTER TABLE `agent_company`
  ADD CONSTRAINT `agent_company_agent_id_foreign` FOREIGN KEY (`agent_id`) REFERENCES `agents` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `agent_company_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `agent_payments`
--
ALTER TABLE `agent_payments`
  ADD CONSTRAINT `agent_payments_agent_id_foreign` FOREIGN KEY (`agent_id`) REFERENCES `agents` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `agent_payments_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `candidates`
--
ALTER TABLE `candidates`
  ADD CONSTRAINT `candidates_agent_id_foreign` FOREIGN KEY (`agent_id`) REFERENCES `agents` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `candidates_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `candidates_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `case_steps`
--
ALTER TABLE `case_steps`
  ADD CONSTRAINT `case_steps_done_by_foreign` FOREIGN KEY (`done_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `case_steps_recruitment_case_id_foreign` FOREIGN KEY (`recruitment_case_id`) REFERENCES `recruitment_cases` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `case_steps_step_id_foreign` FOREIGN KEY (`step_id`) REFERENCES `steps` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `companies`
--
ALTER TABLE `companies`
  ADD CONSTRAINT `companies_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `expenses`
--
ALTER TABLE `expenses`
  ADD CONSTRAINT `expenses_paid_by_foreign` FOREIGN KEY (`paid_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `expenses_recruitment_case_id_foreign` FOREIGN KEY (`recruitment_case_id`) REFERENCES `recruitment_cases` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `payments`
--
ALTER TABLE `payments`
  ADD CONSTRAINT `payments_received_by_foreign` FOREIGN KEY (`received_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `payments_recruitment_case_id_foreign` FOREIGN KEY (`recruitment_case_id`) REFERENCES `recruitment_cases` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `recruitment_cases`
--
ALTER TABLE `recruitment_cases`
  ADD CONSTRAINT `recruitment_cases_candidate_id_foreign` FOREIGN KEY (`candidate_id`) REFERENCES `candidates` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `recruitment_cases_current_step_id_foreign` FOREIGN KEY (`current_step_id`) REFERENCES `steps` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `role_permission`
--
ALTER TABLE `role_permission`
  ADD CONSTRAINT `fk_rp_permission` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_rp_role` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `staffs`
--
ALTER TABLE `staffs`
  ADD CONSTRAINT `staffs_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `staff_salaries`
--
ALTER TABLE `staff_salaries`
  ADD CONSTRAINT `staff_salaries_generated_by_foreign` FOREIGN KEY (`generated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `staff_salaries_staff_id_foreign` FOREIGN KEY (`staff_id`) REFERENCES `staffs` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `staff_salary_payments`
--
ALTER TABLE `staff_salary_payments`
  ADD CONSTRAINT `staff_salary_payments_received_by_foreign` FOREIGN KEY (`received_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `staff_salary_payments_staff_salary_id_foreign` FOREIGN KEY (`staff_salary_id`) REFERENCES `staff_salaries` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `user_role`
--
ALTER TABLE `user_role`
  ADD CONSTRAINT `fk_ur_role` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_ur_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `visa_inquiries`
--
ALTER TABLE `visa_inquiries`
  ADD CONSTRAINT `visa_inquiries_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`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 */;
