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

START TRANSACTION;



--
-- Database: `portalroles`
--

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

--
-- Table structure for table `break_times`
--

CREATE TABLE `break_times` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `userportal_id` bigint(20) UNSIGNED NOT NULL,
  `breakstart` varchar(255) DEFAULT NULL,
  `breakend` 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 `break_times`
--

INSERT INTO `break_times` (`id`, `userportal_id`, `breakstart`, `breakend`, `created_at`, `updated_at`) VALUES
(1, 1, '11:40:46', '11:40:54', '2023-10-28 00:40:46', '2023-10-28 00:40:54'),
(2, 2, '11:41:38', '11:41:43', '2023-10-28 00:41:38', '2023-10-28 00:41:43'),
(3, 2, '11:41:50', '11:42:02', '2023-10-28 00:41:50', '2023-10-28 00:42:02'),
(4, 2, '11:42:16', '11:42:22', '2023-10-28 00:42:16', '2023-10-28 00:42:22'),
(5, 3, '11:45:23', '11:45:37', '2023-10-28 00:45:23', '2023-10-28 00:45:37'),
(6, 3, '11:46:01', '11:46:24', '2023-10-28 00:46:01', '2023-10-28 00:46:24'),
(7, 4, '11:49:22', '11:49:36', '2023-10-28 00:49:22', '2023-10-28 00:49:36'),
(8, 5, '11:51:43', '11:52:15', '2023-10-28 00:51:43', '2023-10-28 00:52:15'),
(9, 5, '11:52:39', '11:52:49', '2023-10-28 00:52:39', '2023-10-28 00:52:49'),
(10, 6, '12:52:04', '13:06:43', '2023-10-28 01:52:04', '2023-10-28 02:06:43'),
(11, 7, '11:06:37', '11:06:42', '2023-11-02 00:06:37', '2023-11-02 00:06:42'),
(12, 7, '11:06:50', '11:06:56', '2023-11-02 00:06:50', '2023-11-02 00:06:56');

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

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

CREATE TABLE `financialyears` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `financial_year` varchar(255) NOT NULL,
  `from_date` date NOT NULL,
  `to_date` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `financialyears`
--

INSERT INTO `financialyears` (`id`, `financial_year`, `from_date`, `to_date`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'FY2023', '2023-01-01', '2023-12-31', '2023-10-24 23:01:41', '2023-10-24 23:01:41', NULL),
(2, 'FY2024', '2024-01-01', '2024-12-31', '2023-10-24 23:01:59', '2023-11-03 03:47:15', '2023-11-03 03:47:15');

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

--
-- Table structure for table `integrations`
--

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

--
-- Dumping data for table `integrations`
--

INSERT INTO `integrations` (`id`, `teamswebhook`, `created_at`, `updated_at`) VALUES
(1, 'https://oryonbiz.webhook.office.com/webhookb2/85f5c5a3-f27a-492e-8c09-4b6193b58f4a@12865514-f6fa-41c1-a8cc-f2bdb7811483/IncomingWebhook/5c161694648045e4bd3c6f87411c3420/2a526e00-d3e7-456c-9455-b5ae68f89609', '2023-11-02 01:32:55', '2023-11-02 01:32:55');

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

--
-- Table structure for table `leaves`
--

CREATE TABLE `leaves` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `leave_applicant` bigint(20) UNSIGNED NOT NULL,
  `applied_date` date NOT NULL,
  `leave_type` varchar(255) NOT NULL,
  `from_date` date NOT NULL,
  `to_date` date NOT NULL,
  `reason` text NOT NULL,
  `is_approval` 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 `leaves`
--

INSERT INTO `leaves` (`id`, `leave_applicant`, `applied_date`, `leave_type`, `from_date`, `to_date`, `reason`, `is_approval`, `created_at`, `updated_at`) VALUES
(1, 2, '2023-10-26', '1', '2023-10-26', '2023-10-29', 'Festival', 0, '2023-10-26 02:17:09', '2023-10-26 02:17:09'),
(2, 2, '2023-10-26', '2', '2023-10-30', '2023-11-01', 'Fever', 0, '2023-10-26 02:18:08', '2023-10-26 02:18:08'),
(3, 10, '2023-11-02', '1', '2023-11-02', '2023-11-02', 'Festival', 0, '2023-11-02 00:27:21', '2023-11-02 00:27:21');

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

--
-- Table structure for table `leave_types`
--

CREATE TABLE `leave_types` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `custom_leave_type` varchar(255) NOT NULL,
  `number_of_days` int(11) NOT NULL,
  `financialyear_id` bigint(20) UNSIGNED NOT NULL,
  `is_applied` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `leave_types`
--

INSERT INTO `leave_types` (`id`, `custom_leave_type`, `number_of_days`, `financialyear_id`, `is_applied`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Casual Leave', 10, 1, 1, '2023-11-03 03:45:11', '2023-11-03 03:45:11', NULL),
(2, 'Medical Leave', 8, 1, 1, '2023-11-03 03:45:23', '2023-11-03 03:45:23', NULL),
(3, 'demo', 1, 1, 0, '2023-11-03 04:40:14', '2023-11-03 04:40:14', NULL);

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

--
-- 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, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_reset_tokens_table', 1),
(3, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(5, '2023_09_04_043016_create_permission_tables', 1),
(6, '2023_09_04_043356_add_permission_group_id_to_permissions_table', 1),
(7, '2023_09_04_043439_create_permission_groups_table', 1),
(8, '2023_09_04_073918_create_userprofiles_table', 1),
(9, '2023_09_04_074333_create_userexperiences_table', 1),
(10, '2023_09_04_074705_create_usereducations_table', 1),
(11, '2023_09_04_114723_create_userportals_table', 2),
(12, '2023_09_05_034817_create_organizations_table', 3),
(13, '2023_09_05_034938_create_integrations_table', 4),
(14, '2023_09_08_062942_create_leaves_table', 5),
(15, '2023_09_08_103113_add_column_to_userprofiles_table', 6),
(16, '2023_09_08_111951_create_leaves_table', 7),
(17, '2023_09_09_045359_add_column_to_leaves_table', 8),
(18, '2023_09_15_073328_create_publicholidays_table', 9),
(19, '2023_09_21_101352_add_casual_and_medical_leave_to_userprofiles_table', 10),
(20, '2023_09_22_073525_create_adminleavesettings_table', 11),
(21, '2023_09_23_072116_create_financialyears_table', 12),
(22, '2023_09_23_091517_create_adminleavesettings_table', 13),
(23, '2023_09_28_075023_add_is_applied_to_adminleavesettings_table', 14),
(24, '2023_10_09_035133_add_ssinterval_to_organizations_table', 15),
(25, '2023_10_09_035445_add_ssinterval_to_organizations_table', 16),
(26, '2023_10_11_040302_create_screenshots_table', 17),
(27, '2023_10_11_101012_add_date_to_screenshots_table', 18),
(28, '2023_10_14_081424_create_leave_type_table', 19),
(29, '2023_10_14_094314_create_leavetypes_table', 20),
(30, '2023_10_23_070110_create_leave_types_table', 21),
(31, '2023_10_23_090713_create_leave_types_table', 22),
(32, '2023_10_23_110936_create_leave_types_table', 23),
(33, '2023_10_24_050457_create_user_leave_types_table', 24),
(34, '2023_10_24_084437_add_is_applied_to_leave_types_table', 25),
(35, '2023_10_25_042800_create_financialyears_table', 26),
(36, '2023_10_25_042941_create_leave_types_table', 26),
(37, '2023_10_25_043025_create_user_leave_types_table', 26),
(38, '2023_10_25_085751_create_leaves_table', 27),
(39, '2023_10_25_091353_create_leaves_table', 28),
(40, '2023_10_28_060618_create_userportals_table', 29),
(41, '2023_10_28_060651_create_break_times_table', 30),
(42, '2023_11_01_092803_create_organizations_table', 31),
(43, '2023_11_02_044156_add_remember_token_to_users', 32),
(44, '2023_11_03_073434_create_leave_types_table', 33),
(45, '2023_11_03_073542_create_user_leave_types_table', 33),
(46, '2023_11_03_083359_add_soft_deletes_to_financialyears_table', 33),
(47, '2023_11_03_084157_add_soft_deletes_to_leave_types_table', 33),
(48, '2023_11_03_090144_add_soft_deletes_to_publicholidays_table', 33);

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

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

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

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

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

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

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

INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES
(1, 'App\\Models\\User', 1),
(2, 'App\\Models\\User', 2),
(2, 'App\\Models\\User', 3),
(3, 'App\\Models\\User', 2),
(3, 'App\\Models\\User', 3),
(3, 'App\\Models\\User', 4),
(3, 'App\\Models\\User', 5),
(3, 'App\\Models\\User', 6),
(3, 'App\\Models\\User', 7),
(3, 'App\\Models\\User', 8),
(3, 'App\\Models\\User', 10),
(3, 'App\\Models\\User', 11),
(3, 'App\\Models\\User', 15),
(3, 'App\\Models\\User', 16),
(3, 'App\\Models\\User', 19),
(3, 'App\\Models\\User', 21),
(3, 'App\\Models\\User', 23),
(3, 'App\\Models\\User', 24),
(3, 'App\\Models\\User', 25),
(3, 'App\\Models\\User', 26),
(3, 'App\\Models\\User', 27),
(3, 'App\\Models\\User', 28),
(3, 'App\\Models\\User', 29),
(3, 'App\\Models\\User', 30),
(3, 'App\\Models\\User', 31),
(3, 'App\\Models\\User', 33),
(3, 'App\\Models\\User', 34),
(3, 'App\\Models\\User', 35),
(3, 'App\\Models\\User', 39);

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

--
-- Table structure for table `organizations`
--

CREATE TABLE `organizations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `org_name` varchar(255) NOT NULL,
  `org_logo` varchar(255) DEFAULT NULL,
  `ssinterval` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `organizations`
--

INSERT INTO `organizations` (`id`, `org_name`, `org_logo`, `ssinterval`, `created_at`, `updated_at`) VALUES
(1, 'oryon exceeding expectation', 'logos/xcLnPeggBax6uMbuBvajObsNi2gnHcwRSroxJlf8.png', '1800000', '2023-11-01 06:19:32', '2023-11-02 00:41:24');

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

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

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

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

INSERT INTO `permissions` (`id`, `name`, `guard_name`, `created_at`, `updated_at`, `permission_group_id`) VALUES
(1, 'Portal', 'web', '2023-10-12 08:37:01', '2023-10-12 08:37:01', 1),
(2, 'Profile', 'web', '2023-10-12 08:37:28', '2023-10-12 08:37:28', 1),
(3, 'Report', 'web', '2023-10-12 08:37:58', '2023-10-12 08:37:58', 1),
(4, 'Apply Leave', 'web', '2023-10-12 08:38:21', '2023-10-12 08:38:21', 1),
(5, 'Public Holiday', 'web', '2023-10-12 08:38:51', '2023-10-12 08:38:51', 1),
(6, 'Dashboard', 'web', '2023-10-12 08:39:16', '2023-10-12 08:39:16', 2),
(7, 'Settings', 'web', '2023-10-12 08:39:54', '2023-10-12 08:39:54', 2),
(8, 'Financial Year', 'web', '2023-10-12 08:40:26', '2023-10-12 08:40:26', 2),
(9, 'Financial Leave', 'web', '2023-10-12 08:40:55', '2023-10-12 08:40:55', 2),
(10, 'User List', 'web', '2023-10-12 08:41:21', '2023-10-12 08:41:21', 2),
(11, 'Add Roles', 'web', '2023-10-12 08:41:48', '2023-10-12 08:41:48', 2),
(12, 'User Roles', 'web', '2023-10-12 08:43:11', '2023-10-12 08:43:11', 2),
(13, 'UserReport', 'web', '2023-10-12 08:43:42', '2023-10-12 08:43:42', 2),
(14, 'LeaveReport', 'web', '2023-10-12 08:44:04', '2023-10-12 08:44:04', 2),
(15, 'Team Leave form', 'web', '2023-10-12 08:44:46', '2023-10-12 08:44:46', 2),
(16, 'Add Holiday', 'web', '2023-10-12 08:45:02', '2023-10-12 08:45:02', 2),
(17, 'Screenshots', 'web', '2023-10-12 08:45:23', '2023-10-12 08:45:23', 2);

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

--
-- Table structure for table `permission_groups`
--

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

--
-- Dumping data for table `permission_groups`
--

INSERT INTO `permission_groups` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'Employee', '2023-10-12 08:32:19', '2023-10-12 08:32:19'),
(2, 'Admin', '2023-10-12 08:32:42', '2023-10-12 08:32:42');

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

--
-- Table structure for table `publicholidays`
--

CREATE TABLE `publicholidays` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `date` date NOT NULL,
  `holiday` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `publicholidays`
--

INSERT INTO `publicholidays` (`id`, `date`, `holiday`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, '2023-09-19', 'Ganesh Chaturthi', '2023-10-13 22:20:51', '2023-10-13 22:20:51', NULL),
(2, '2023-09-28', 'Eid-E-Milad', '2023-10-13 22:21:10', '2023-10-13 22:21:10', NULL),
(3, '2023-10-02', 'Gandhi Jayanti', '2023-10-13 22:21:23', '2023-10-13 22:21:23', NULL),
(4, '2023-10-23', 'Maha Navami', '2023-10-13 22:21:40', '2023-10-13 22:21:40', NULL),
(5, '2023-10-24', 'Vijaya Dashami', '2023-10-13 22:21:56', '2023-10-13 22:21:56', NULL),
(6, '2023-11-12', 'Deepavali', '2023-10-13 22:22:09', '2023-10-13 22:22:09', NULL),
(7, '2023-12-25', 'Christmas', '2023-10-13 22:22:27', '2023-10-13 22:22:27', NULL),
(8, '2024-01-01', 'New Year', '2023-10-13 22:23:40', '2023-10-13 22:24:11', NULL);

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

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

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

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

INSERT INTO `roles` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
(1, 'Super Admin', 'web', '2023-09-04 03:26:19', '2023-09-04 03:26:19'),
(2, 'Admin', 'web', '2023-09-04 03:28:36', '2023-09-04 03:28:36'),
(3, 'Employee', 'web', '2023-09-05 05:27:09', '2023-09-05 05:27:09');

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

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

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

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

INSERT INTO `role_has_permissions` (`permission_id`, `role_id`) VALUES
(1, 1),
(1, 2),
(1, 3),
(2, 1),
(2, 2),
(2, 3),
(3, 1),
(3, 2),
(3, 3),
(4, 1),
(4, 2),
(4, 3),
(5, 1),
(5, 2),
(5, 3),
(6, 1),
(6, 2),
(7, 1),
(7, 2),
(8, 1),
(8, 2),
(9, 1),
(9, 2),
(10, 1),
(10, 2),
(11, 1),
(11, 2),
(12, 1),
(12, 2),
(13, 1),
(13, 2),
(14, 1),
(14, 2),
(15, 1),
(15, 2),
(16, 1),
(16, 2),
(17, 1),
(17, 2);

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

--
-- Table structure for table `screenshots`
--

CREATE TABLE `screenshots` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `date_field` date DEFAULT NULL,
  `folder_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `screenshots`
--

INSERT INTO `screenshots` (`id`, `user_id`, `date_field`, `folder_name`, `created_at`, `updated_at`) VALUES
(1, 3, '2023-10-11', 'screenshots/y_2023/m_10/d_11/userid_3', '2023-10-10 22:59:24', '2023-10-10 22:59:24'),
(2, 2, '2023-10-11', 'screenshots/y_2023/m_10/d_11/userid_2', '2023-10-11 04:31:00', '2023-10-11 04:31:00'),
(3, 2, '2023-10-12', 'screenshots/y_2023/m_10/d_12/userid_2', '2023-10-11 22:54:26', '2023-10-11 22:54:26'),
(4, 2, NULL, 'screenshots/y_2023/m_10/d_13/userid_2', '2023-10-12 23:36:23', '2023-10-12 23:36:23'),
(5, 2, '2023-10-13', 'screenshots/y_2023/m_10/d_13/userid_2', '2023-10-12 23:41:25', '2023-10-12 23:41:25'),
(6, 2, '2023-10-14', 'screenshots/y_2023/m_10/d_14/userid_2', '2023-10-13 22:28:08', '2023-10-13 22:28:08'),
(7, 2, '2023-10-16', 'screenshots/y_2023/m_10/d_16/userid_2', '2023-10-16 00:47:10', '2023-10-16 00:47:10'),
(8, 2, '2023-10-23', 'screenshots/y_2023/m_10/d_23/userid_2', '2023-10-23 03:10:37', '2023-10-23 03:10:37'),
(9, 2, '2023-10-24', 'screenshots/y_2023/m_10/d_24/userid_2', '2023-10-24 00:21:58', '2023-10-24 00:21:58'),
(10, 2, '2023-10-25', 'screenshots/y_2023/m_10/d_25/userid_2', '2023-10-25 02:11:13', '2023-10-25 02:11:13'),
(11, 2, '2023-10-26', 'screenshots/y_2023/m_10/d_26/userid_2', '2023-10-26 02:51:45', '2023-10-26 02:51:45'),
(12, 2, '2023-10-27', 'screenshots/y_2023/m_10/d_27/userid_2', '2023-10-26 23:02:24', '2023-10-26 23:02:24'),
(13, 2, '2023-10-28', 'screenshots/y_2023/m_10/d_28/userid_2', '2023-10-27 21:31:12', '2023-10-27 21:31:12'),
(14, 2, '2023-11-01', 'screenshots/y_2023/m_11/d_01/userid_2', '2023-11-01 02:38:16', '2023-11-01 02:38:16'),
(15, 2, '2023-11-02', 'screenshots/y_2023/m_11/d_02/userid_2', '2023-11-02 06:35:51', '2023-11-02 06:35:51'),
(16, 2, '2023-11-03', 'screenshots/y_2023/m_11/d_03/userid_2', '2023-11-03 01:37:06', '2023-11-03 01:37:06');

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

--
-- Table structure for table `usereducations`
--

CREATE TABLE `usereducations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `degree` varchar(255) NOT NULL,
  `branch` varchar(255) NOT NULL,
  `college` varchar(255) NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `usereducations`
--

INSERT INTO `usereducations` (`id`, `user_id`, `degree`, `branch`, `college`, `deleted_at`, `created_at`, `updated_at`) VALUES
(1, 25, 'BE', 'E&I', 'SRM', NULL, '2023-09-13 00:11:47', '2023-09-13 00:26:59'),
(2, 2, 'BE', 'EEE', 'AAS', NULL, NULL, NULL),
(3, 3, 'BE', 'EEE', 'AAA', NULL, NULL, NULL),
(4, 39, 'BE', 'EEE', 'AAA', NULL, NULL, NULL);

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

--
-- Table structure for table `userexperiences`
--

CREATE TABLE `userexperiences` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `numofexperience` varchar(255) NOT NULL,
  `dateofjoining` date NOT NULL,
  `courses` varchar(255) NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `userexperiences`
--

INSERT INTO `userexperiences` (`id`, `user_id`, `numofexperience`, `dateofjoining`, `courses`, `deleted_at`, `created_at`, `updated_at`) VALUES
(1, 25, '1', '2023-09-14', 'Data Analysts', NULL, '2023-09-13 00:09:27', '2023-09-13 00:24:38'),
(2, 2, '1', '2023-09-22', 'Web developement', NULL, NULL, NULL),
(3, 3, '1', '2023-10-06', 'Web developement', NULL, NULL, NULL),
(4, 39, '1', '2023-11-04', 'Web developement', NULL, NULL, NULL);

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

--
-- Table structure for table `userportals`
--

CREATE TABLE `userportals` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `date_field` date NOT NULL,
  `punchintime` varchar(255) DEFAULT NULL,
  `punchouttime` varchar(255) DEFAULT NULL,
  `total_shift_time` varchar(255) DEFAULT NULL,
  `total_working_hours` varchar(255) DEFAULT NULL,
  `total_break_time` 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 `userportals`
--

INSERT INTO `userportals` (`id`, `user_id`, `date_field`, `punchintime`, `punchouttime`, `total_shift_time`, `total_working_hours`, `total_break_time`, `created_at`, `updated_at`) VALUES
(1, 2, '2023-10-28', '11:40:33', '11:40:59', '00:00:26', '00:00:18', '00:00:08', '2023-10-28 00:40:33', '2023-10-28 00:40:59'),
(2, 2, '2023-10-28', '11:41:25', '11:42:28', '00:01:03', '00:00:40', '00:00:23', '2023-10-28 00:41:25', '2023-10-28 00:42:28'),
(3, 2, '2023-10-28', '11:45:09', '11:46:35', '00:01:26', '00:00:49', '00:00:37', '2023-10-28 00:45:09', '2023-10-28 00:46:35'),
(4, 2, '2023-10-28', '11:49:04', '11:50:03', '00:00:59', '00:00:45', '00:00:14', '2023-10-28 00:49:04', '2023-10-28 00:50:03'),
(5, 3, '2023-10-28', '11:51:26', '11:53:09', '00:01:43', '00:01:01', '00:00:42', '2023-10-28 00:51:26', '2023-10-28 00:53:09'),
(6, 2, '2023-10-28', '12:51:36', '13:06:49', '00:15:13', '00:00:34', '00:14:39', '2023-10-28 01:51:36', '2023-10-28 02:06:49'),
(7, 3, '2023-11-02', '11:06:31', '11:07:00', '00:00:29', '00:00:18', '00:00:11', '2023-11-02 00:06:31', '2023-11-02 00:07:00');

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

--
-- Table structure for table `userprofiles`
--

CREATE TABLE `userprofiles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `permanent_id` varchar(255) DEFAULT NULL,
  `role` varchar(255) DEFAULT NULL,
  `reporting_manager` bigint(20) UNSIGNED DEFAULT NULL,
  `photo` varchar(255) DEFAULT NULL,
  `phonenumber` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `hobbies` varchar(255) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `userprofiles`
--

INSERT INTO `userprofiles` (`id`, `user_id`, `permanent_id`, `role`, `reporting_manager`, `photo`, `phonenumber`, `address`, `dob`, `hobbies`, `deleted_at`, `created_at`, `updated_at`) VALUES
(1, 2, NULL, 'Jr. Developer', 3, 'profilephoto/1695293082_girl1.png', NULL, NULL, NULL, NULL, NULL, '2023-09-04 04:13:43', '2023-10-12 04:28:55'),
(2, 3, '1100191', 'Android Developer', NULL, 'profilephoto/1696589943_boy1.png', NULL, NULL, NULL, NULL, NULL, '2023-09-04 04:49:40', '2023-10-12 04:28:31'),
(3, 4, '1192200', 'Web Developer', 2, 'profilephoto/1693900145.png', '9876543211', 'Anna nagar, Madurai', '2023-09-03', 'Drawing,painting', NULL, '2023-09-05 02:19:05', '2023-10-03 01:19:12'),
(4, 5, '152001', 'Android Developer', 3, 'profilephoto/1695293062_Engineer1-q9jzfn99nfmg2djb0ccq8eesjvakxw1z4ynueob8ag.png', NULL, NULL, NULL, NULL, NULL, '2023-09-05 22:47:49', '2023-10-03 01:19:12'),
(5, 6, '152002', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-05 22:59:42', '2023-10-03 01:19:12'),
(6, 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-08 05:23:01', '2023-10-03 01:19:12'),
(7, 8, NULL, 'Web developer', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-08 05:29:31', '2023-10-03 01:19:12'),
(9, 10, NULL, 'Web developer', 2, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-08 05:40:15', '2023-10-03 01:19:12'),
(13, 15, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-12 00:16:28', '2023-10-03 01:19:12'),
(14, 16, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-12 00:40:20', '2023-10-03 01:19:12'),
(17, 19, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-12 02:08:45', '2023-10-03 01:19:12'),
(19, 23, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-12 22:38:03', '2023-10-03 01:19:12'),
(20, 25, '1101098', 'web developer', NULL, NULL, '98767676767', 'Madurai', '2023-08-19', 'Drawing', NULL, '2023-09-13 00:01:59', '2023-10-03 01:19:12'),
(21, 26, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-13 22:04:40', '2023-10-03 01:19:12'),
(22, 27, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-15 06:04:51', '2023-10-03 01:19:12'),
(23, 28, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-21 04:45:43', '2023-10-03 01:19:12'),
(24, 29, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-21 04:49:24', '2023-10-03 01:19:12'),
(25, 30, '1101098', 'web developer', NULL, NULL, '98767676767', 'Madurai', '2023-08-19', 'Drawing', NULL, '2023-09-21 04:52:22', '2023-10-03 01:19:12'),
(26, 31, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-21 04:58:34', '2023-10-03 01:19:12'),
(27, 1, NULL, NULL, 2, 'profilephoto/1695365985_sa.png', NULL, NULL, NULL, NULL, NULL, NULL, '2023-10-03 01:19:12'),
(29, 33, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-24 23:58:42', '2023-10-03 01:19:12'),
(30, 34, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-24 23:59:56', '2023-10-03 01:19:12'),
(31, 35, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-25 02:08:05', '2023-10-03 01:19:12'),
(33, 37, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-25 05:25:19', '2023-10-03 01:19:12'),
(34, 39, '1100191', 'Web developer', 2, NULL, '9635663565', 'Madurai', '2023-11-01', 'Drawing,painting', NULL, '2023-11-02 04:26:31', '2023-11-02 04:27:37');

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

--
-- Table structure for table `user_leave_types`
--

CREATE TABLE `user_leave_types` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `leave_type_id` bigint(20) UNSIGNED NOT NULL,
  `number_of_days` int(11) 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 `user_leave_types`
--

INSERT INTO `user_leave_types` (`id`, `user_id`, `leave_type_id`, `number_of_days`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 10, NULL, NULL),
(2, 2, 1, 10, NULL, NULL),
(3, 3, 1, 10, NULL, NULL),
(4, 4, 1, 10, NULL, NULL),
(5, 5, 1, 10, NULL, NULL),
(6, 7, 1, 10, NULL, NULL),
(7, 8, 1, 10, NULL, NULL),
(8, 10, 1, 10, NULL, NULL),
(9, 11, 1, 10, NULL, NULL),
(10, 15, 1, 10, NULL, NULL),
(11, 16, 1, 10, NULL, NULL),
(12, 19, 1, 10, NULL, NULL),
(13, 21, 1, 10, NULL, NULL),
(14, 23, 1, 10, NULL, NULL),
(15, 25, 1, 10, NULL, NULL),
(16, 26, 1, 10, NULL, NULL),
(17, 27, 1, 10, NULL, NULL),
(18, 28, 1, 10, NULL, NULL),
(19, 29, 1, 10, NULL, NULL),
(20, 30, 1, 10, NULL, NULL),
(21, 31, 1, 10, NULL, NULL),
(22, 33, 1, 10, NULL, NULL),
(23, 34, 1, 10, NULL, NULL),
(24, 38, 1, 10, NULL, NULL),
(25, 39, 1, 10, NULL, NULL),
(26, 1, 2, 8, NULL, NULL),
(27, 2, 2, 8, NULL, NULL),
(28, 3, 2, 8, NULL, NULL),
(29, 4, 2, 8, NULL, NULL),
(30, 5, 2, 8, NULL, NULL),
(31, 7, 2, 8, NULL, NULL),
(32, 8, 2, 8, NULL, NULL),
(33, 10, 2, 8, NULL, NULL),
(34, 11, 2, 8, NULL, NULL),
(35, 15, 2, 8, NULL, NULL),
(36, 16, 2, 8, NULL, NULL),
(37, 19, 2, 8, NULL, NULL),
(38, 21, 2, 8, NULL, NULL),
(39, 23, 2, 8, NULL, NULL),
(40, 25, 2, 8, NULL, NULL),
(41, 26, 2, 8, NULL, NULL),
(42, 27, 2, 8, NULL, NULL),
(43, 28, 2, 8, NULL, NULL),
(44, 29, 2, 8, NULL, NULL),
(45, 30, 2, 8, NULL, NULL),
(46, 31, 2, 8, NULL, NULL),
(47, 33, 2, 8, NULL, NULL),
(48, 34, 2, 8, NULL, NULL),
(49, 38, 2, 8, NULL, NULL),
(50, 39, 2, 8, NULL, NULL);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `break_times`
--
ALTER TABLE `break_times`
  ADD PRIMARY KEY (`id`),
  ADD KEY `break_times_userportal_id_foreign` (`userportal_id`);

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

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

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

--
-- Indexes for table `leaves`
--
ALTER TABLE `leaves`
  ADD PRIMARY KEY (`id`),
  ADD KEY `leaves_leave_applicant_foreign` (`leave_applicant`);

--
-- Indexes for table `leave_types`
--
ALTER TABLE `leave_types`
  ADD PRIMARY KEY (`id`),
  ADD KEY `leave_types_financialyear_id_foreign` (`financialyear_id`);

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `screenshots`
--
ALTER TABLE `screenshots`
  ADD PRIMARY KEY (`id`),
  ADD KEY `screenshots_user_id_foreign` (`user_id`);

--
-- Indexes for table `usereducations`
--
ALTER TABLE `usereducations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `usereducations_user_id_foreign` (`user_id`);

--
-- Indexes for table `userexperiences`
--
ALTER TABLE `userexperiences`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userexperiences_user_id_foreign` (`user_id`);

--
-- Indexes for table `userportals`
--
ALTER TABLE `userportals`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userportals_user_id_foreign` (`user_id`);

--
-- Indexes for table `userprofiles`
--
ALTER TABLE `userprofiles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userprofiles_user_id_foreign` (`user_id`),
  ADD KEY `userprofiles_reporting_manager_foreign` (`reporting_manager`);

--
-- Indexes for table `user_leave_types`
--
ALTER TABLE `user_leave_types`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_leave_types_user_id_foreign` (`user_id`),
  ADD KEY `user_leave_types_leave_type_id_foreign` (`leave_type_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `break_times`
--
ALTER TABLE `break_times`
  ADD CONSTRAINT `break_times_userportal_id_foreign` FOREIGN KEY (`userportal_id`) REFERENCES `userportals` (`id`);

--
-- Constraints for table `leave_types`
--
ALTER TABLE `leave_types`
  ADD CONSTRAINT `leave_types_financialyear_id_foreign` FOREIGN KEY (`financialyear_id`) REFERENCES `financialyears` (`id`);

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

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

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

--
-- Constraints for table `screenshots`
--
ALTER TABLE `screenshots`
  ADD CONSTRAINT `screenshots_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `usereducations`
--
ALTER TABLE `usereducations`
  ADD CONSTRAINT `usereducations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `userexperiences`
--
ALTER TABLE `userexperiences`
  ADD CONSTRAINT `userexperiences_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `userportals`
--
ALTER TABLE `userportals`
  ADD CONSTRAINT `userportals_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `userprofiles`
--
ALTER TABLE `userprofiles`
  ADD CONSTRAINT `userprofiles_reporting_manager_foreign` FOREIGN KEY (`reporting_manager`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `userprofiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `user_leave_types`
--
ALTER TABLE `user_leave_types`
  ADD CONSTRAINT `user_leave_types_leave_type_id_foreign` FOREIGN KEY (`leave_type_id`) REFERENCES `leave_types` (`id`),
  ADD CONSTRAINT `user_leave_types_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
COMMIT;


