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

START TRANSACTION;



--
-- Database: `portalroles`
--

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

--
-- Table structure for table `adminleavesettings`
--

CREATE TABLE `adminleavesettings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `starting_year` date NOT NULL,
  `ending_year` date NOT NULL,
  `admincl` varchar(255) NOT NULL,
  `adminml` 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 `adminleavesettings`
--

INSERT INTO `adminleavesettings` (`id`, `starting_year`, `ending_year`, `admincl`, `adminml`, `created_at`, `updated_at`) VALUES
(1, '2023-01-01', '2023-12-31', '12', '12', '2023-09-22 03:30:26', '2023-09-22 03:30:26'),
(2, '2023-01-01', '2023-12-31', '12', '7', '2023-09-22 03:30:55', '2023-09-22 03:30:55');

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

--
-- 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
) 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`) VALUES
(1, 'FY2023', '2023-01-01', '2023-12-31', '2023-09-23 02:18:51', '2023-09-23 02:18:51');

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

--
-- 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-09-04 23:28:36', '2023-09-04 23:28:36'),
(2, 'https://oryonbiz.webhook.office.com/webhookb2/85f5c5a3-f27a-492e-8c09-4b6193b58f4a@12865514-f6fa-41c1-a8cc-f2bdb7811483/IncomingWebhook/5c161694648045e4bd3c6f87411c3420/2a526e00-d3e7-456c-9455-b5ae68f89609', '2023-09-12 23:54:18', '2023-09-12 23:54:18');

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

--
-- 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,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `is_approval` tinyint(1) NOT NULL DEFAULT 0
) 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`, `created_at`, `updated_at`, `is_approval`) VALUES
(1, 4, '2023-09-09', 'Casual Leave', '2023-09-09', '2023-09-11', 'demo', '2023-09-08 22:50:50', '2023-09-09 02:11:46', 1),
(2, 4, '2023-09-09', 'Medical Leave', '2023-09-12', '2023-09-15', 'Fever', '2023-09-09 02:07:00', '2023-09-11 00:30:08', 1),
(3, 5, '2023-09-11', 'Casual Leave', '2023-09-11', '2023-09-14', 'Occasion', '2023-09-10 23:32:40', '2023-09-10 23:32:40', 0),
(6, 10, '2023-09-13', 'Medical Leave', '2023-09-13', '2023-09-15', 'Fever', '2023-09-12 22:15:08', '2023-09-12 22:16:16', 1),
(7, 10, '2023-09-13', 'casual leave', '2023-09-20', '2023-09-21', 'Festival', '2023-09-12 23:30:51', '2023-09-13 01:48:21', 1),
(25, 2, '2023-09-14', 'Casual Leave', '2023-09-14', '2023-09-15', 'demo', '2023-09-13 23:07:13', '2023-09-13 23:07:13', 0),
(26, 2, '2023-09-21', 'Casual Leave', '2023-09-22', '2023-09-22', 'demo', '2023-09-21 05:38:56', '2023-09-21 05:38:56', 0);

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

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

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

--
-- 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', 9),
(3, 'App\\Models\\User', 10),
(3, 'App\\Models\\User', 11),
(3, 'App\\Models\\User', 12),
(3, 'App\\Models\\User', 13),
(3, 'App\\Models\\User', 14),
(3, 'App\\Models\\User', 15),
(3, 'App\\Models\\User', 16),
(3, 'App\\Models\\User', 17),
(3, 'App\\Models\\User', 18),
(3, 'App\\Models\\User', 19),
(3, 'App\\Models\\User', 20),
(3, 'App\\Models\\User', 21),
(3, 'App\\Models\\User', 22),
(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);

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

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

CREATE TABLE `organizations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `org_name` varchar(255) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `org_logo` 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 `organizations`
--

INSERT INTO `organizations` (`id`, `org_name`, `filename`, `org_logo`, `created_at`, `updated_at`) VALUES
(1, 'oryon exceeding expectation', '1693887530.png', 'logos/1693887530.png', '2023-09-04 22:48:50', '2023-09-04 22:48:50');

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

--
-- 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, 'User Create', 'web', '2023-09-04 03:26:19', '2023-09-04 03:26:19', 1),
(2, 'User List', 'web', '2023-09-04 03:26:19', '2023-09-04 03:26:19', 1),
(3, 'User Edit', 'web', '2023-09-04 03:26:19', '2023-09-04 03:26:19', 1),
(4, 'User Delete', 'web', '2023-09-04 03:26:19', '2023-09-04 03:26:19', 1),
(5, 'Role Create', 'web', '2023-09-04 03:26:19', '2023-09-04 03:26:19', 2),
(6, 'Role List', 'web', '2023-09-04 03:26:19', '2023-09-04 03:26:19', 2),
(7, 'Role Edit', 'web', '2023-09-04 03:26:19', '2023-09-04 03:26:19', 2),
(8, 'Role Delete', 'web', '2023-09-04 03:26:19', '2023-09-04 03:26:19', 2),
(9, 'Online Portal', 'web', '2023-09-05 10:52:03', '2023-09-05 10:52:03', 3),
(10, 'Report', 'web', '2023-09-05 10:53:26', '2023-09-05 10:53:26', 3),
(11, 'Leave', 'web', '2023-09-05 10:54:05', '2023-09-05 10:54:05', 3);

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

--
-- 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, 'User', '2023-09-04 03:26:19', '2023-09-04 03:26:19'),
(2, 'Role', '2023-09-04 03:26:19', '2023-09-04 03:26:19'),
(3, 'Employee', '2023-09-06 10:51:21', '2023-09-05 10:51:21');

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

--
-- 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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `publicholidays` (`id`, `date`, `holiday`, `created_at`, `updated_at`) VALUES
(1, '2023-09-18', 'Vinayakar Chathurthi', '2023-09-15 02:19:08', '2023-09-15 02:19:08');

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

--
-- 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'),
(4, 'Demo', 'web', '2023-09-13 03:17:51', '2023-09-13 03:17:51');

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

--
-- 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, 4),
(2, 1),
(2, 2),
(2, 4),
(3, 1),
(3, 2),
(3, 4),
(4, 1),
(4, 2),
(4, 4),
(5, 1),
(5, 4),
(6, 1),
(6, 4),
(7, 1),
(7, 4),
(8, 1),
(8, 4),
(9, 3),
(9, 4),
(10, 3),
(10, 4),
(11, 3),
(11, 4);

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

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

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

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

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

--
-- 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` time DEFAULT NULL,
  `breakintime` time DEFAULT NULL,
  `breakouttime` time DEFAULT NULL,
  `punchouttime` time DEFAULT NULL,
  `total_shift_time` time DEFAULT NULL,
  `total_working_hours` time DEFAULT NULL,
  `total_break_time` time 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`, `breakintime`, `breakouttime`, `punchouttime`, `total_shift_time`, `total_working_hours`, `total_break_time`, `created_at`, `updated_at`) VALUES
(1, 2, '2023-09-04', '09:00:00', '12:00:00', '13:00:00', '17:00:00', '08:00:00', '07:00:00', '01:00:00', '2023-09-03 22:52:26', '2023-09-03 22:53:15'),
(2, 3, '2023-09-05', '10:33:11', '10:33:28', '10:33:45', '10:34:01', '00:00:50', '00:00:33', '00:00:17', '2023-09-04 23:33:11', '2023-09-04 23:34:01'),
(3, 2, '2023-09-05', '10:00:00', '13:00:00', '13:30:00', '18:00:00', '08:00:00', '07:30:00', '00:30:00', '2023-09-04 23:40:31', '2023-09-04 23:41:27'),
(4, 4, '2023-09-05', '07:00:00', '12:00:00', '12:30:00', '03:30:00', '08:30:00', '08:00:00', '00:30:00', '2023-09-05 06:33:10', '2023-09-05 06:35:15'),
(5, 4, '2023-09-08', '09:20:54', '09:21:45', '09:21:51', '09:21:58', '01:01:04', '00:40:58', '00:20:06', '2023-09-07 22:20:54', '2023-09-07 22:21:58'),
(6, 4, '2023-09-09', '08:35:53', '08:36:06', '08:36:24', '08:37:02', '01:01:09', '00:40:51', '00:20:18', '2023-09-08 21:35:53', '2023-09-08 21:37:02'),
(7, 2, '2023-09-11', '22:30:00', '07:16:57', '07:17:01', '09:13:28', '18:46:31', '18:46:27', '00:00:04', '2023-09-10 22:10:34', '2023-09-11 22:13:28'),
(8, 2, '2023-09-11', '22:00:00', '05:00:00', '06:00:00', '09:17:45', '05:47:45', '04:47:45', '01:00:00', '2023-09-10 22:16:20', '2023-09-11 22:17:45'),
(9, 2, '2023-09-12', '09:25:50', '09:25:57', '09:26:06', '09:26:54', '18:31:04', '18:30:55', '00:00:09', '2023-09-11 22:25:50', '2023-09-11 22:26:54'),
(10, 2, '2023-09-12', '22:00:00', '05:00:00', '06:00:00', '09:43:35', '11:43:35', '10:43:35', '01:00:00', '2023-09-11 22:42:23', '2023-09-11 22:43:35'),
(11, 2, '2023-09-12', '23:00:00', '00:00:00', '01:00:00', '09:46:57', '10:46:57', '09:46:57', '01:00:00', '2023-09-11 22:45:02', '2023-09-11 22:46:57'),
(12, 4, '2023-09-13', '12:00:00', '01:00:00', '02:00:00', '03:00:00', '03:00:42', '02:00:25', '01:00:17', '2023-09-13 01:49:05', '2023-09-22 00:07:18'),
(13, 4, '2023-09-22', '11:06:14', '11:06:29', '11:07:34', '11:07:44', '00:01:30', '00:00:25', '00:01:05', '2023-09-22 00:06:14', '2023-09-22 00:07:44');

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

--
-- 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,
  `casual_leave` varchar(255) DEFAULT NULL,
  `medical_leave` 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`, `casual_leave`, `medical_leave`, `phonenumber`, `address`, `dob`, `hobbies`, `deleted_at`, `created_at`, `updated_at`) VALUES
(1, 2, NULL, 'Jr. Developer', 2, 'profilephoto/1695293082_girl1.png', '6', '3', NULL, NULL, NULL, NULL, NULL, '2023-09-04 04:13:43', '2023-09-22 05:13:09'),
(2, 3, '1100191', 'Android Developer', 2, 'profilephoto/1695293103_Engineer1-q9jzfn99nfmg2djb0ccq8eesjvakxw1z4ynueob8ag.png', '12', '7', NULL, NULL, NULL, NULL, NULL, '2023-09-04 04:49:40', '2023-09-22 05:48:29'),
(3, 4, '1192200', 'Web Developer', 2, 'profilephoto/1693900145.png', NULL, NULL, '9876543211', 'Anna nagar, Madurai', '2023-09-03', 'Drawing,painting', NULL, '2023-09-05 02:19:05', '2023-09-05 02:19:05'),
(4, 5, '152001', 'Android Developer', 3, 'profilephoto/1695293062_Engineer1-q9jzfn99nfmg2djb0ccq8eesjvakxw1z4ynueob8ag.png', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-05 22:47:49', '2023-09-21 05:14:22'),
(5, 6, '152002', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-05 22:59:42', '2023-09-05 22:59:42'),
(6, 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-08 05:23:01', '2023-09-08 05:23:01'),
(7, 8, NULL, 'Web developer', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-08 05:29:31', '2023-09-08 05:29:31'),
(8, 9, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-08 05:38:28', '2023-09-08 05:38:28'),
(9, 10, NULL, 'Web developer', 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-08 05:40:15', '2023-09-11 00:05:52'),
(13, 15, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-12 00:16:28', '2023-09-12 00:16:28'),
(14, 16, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-12 00:40:20', '2023-09-12 00:40:20'),
(17, 19, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-12 02:08:45', '2023-09-12 02:08:45'),
(19, 23, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-12 22:38:03', '2023-09-12 22:38:36'),
(20, 25, '1101098', 'web developer', NULL, NULL, NULL, NULL, '98767676767', 'Madurai', '2023-08-19', 'Drawing', NULL, '2023-09-13 00:01:59', '2023-09-13 00:01:59'),
(21, 26, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-13 22:04:40', '2023-09-13 22:04:40'),
(22, 27, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-15 06:04:51', '2023-09-15 06:04:51'),
(23, 28, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-21 04:45:43', '2023-09-21 04:45:43'),
(24, 29, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-21 04:49:24', '2023-09-21 04:49:24'),
(25, 30, '1101098', 'web developer', NULL, NULL, NULL, NULL, '98767676767', 'Madurai', '2023-08-19', 'Drawing', NULL, '2023-09-21 04:52:22', '2023-09-21 04:52:22'),
(26, 31, NULL, NULL, NULL, NULL, '13', '13', NULL, NULL, NULL, NULL, NULL, '2023-09-21 04:58:34', '2023-09-21 04:58:34'),
(27, 1, NULL, NULL, 2, 'profilephoto/1695365985_sa.png', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-22 01:29:45');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `adminleavesettings`
--
ALTER TABLE `adminleavesettings`
  ADD PRIMARY KEY (`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 `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 `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`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `leaves`
--
ALTER TABLE `leaves`
  ADD CONSTRAINT `leaves_leave_applicant_foreign` FOREIGN KEY (`leave_applicant`) REFERENCES `users` (`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 `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;
COMMIT;

