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

START TRANSACTION;



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

