INSERT INTO `gateways` (`form_id`, `code`, `name`, `alias`, `status`, `gateway_parameters`, `supported_currencies`, `crypto`, `extra`, `description`, `created_at`, `updated_at`) VALUES ('0', '124', 'BTCPay', 'BTCPay', '1', '{\"store_id\":{\"title\":\"Store Id\",\"global\":true,\"value\":\"-------\"},\"api_key\":{\"title\":\"Api Key\",\"global\":true,\"value\":\"------\"},\"server_name\":{\"title\":\"Server Name\",\"global\":true,\"value\":\"https:\\/\\/yourbtcpaserver.lndyn.com\"},\"secret_code\":{\"title\":\"Secret Code\",\"global\":true,\"value\":\"----------\"}}', '{\"BTC\":\"Bitcoin\",\"LTC\":\"Litecoin\"}', '1', '{\"webhook\":{\"title\": \"IPN URL\",\"value\":\"ipn.BTCPay\"}}', NULL, NULL, NULL);


INSERT INTO `gateways` (`form_id`, `code`, `name`, `alias`, `status`, `gateway_parameters`, `supported_currencies`, `crypto`, `extra`, `description`, `created_at`, `updated_at`) VALUES ('0', '125', 'Now payments hosted', 'NowPaymentsHosted', '1', '{\"api_key\":{\"title\":\"API Key\",\"global\":true,\"value\":\"-------------------\"},\"secret_key\":{\"title\":\"Secret Key\",\"global\":true,\"value\":\"--------------\"}}', '{\"BTG\":\"BTG\",\"ETH\":\"ETH\",\"XMR\":\"XMR\",\"ZEC\":\"ZEC\",\"XVG\":\"XVG\",\"ADA\":\"ADA\",\"LTC\":\"LTC\",\"BCH\":\"BCH\",\"QTUM\":\"QTUM\",\"DASH\":\"DASH\",\"XLM\":\"XLM\",\"XRP\":\"XRP\",\"XEM\":\"XEM\",\"DGB\":\"DGB\",\"LSK\":\"LSK\",\"DOGE\":\"DOGE\",\"TRX\":\"TRX\",\"KMD\":\"KMD\",\"REP\":\"REP\",\"BAT\":\"BAT\",\"ARK\":\"ARK\",\"WAVES\":\"WAVES\",\"BNB\":\"BNB\",\"XZC\":\"XZC\",\"NANO\":\"NANO\",\"TUSD\":\"TUSD\",\"VET\":\"VET\",\"ZEN\":\"ZEN\",\"GRS\":\"GRS\",\"FUN\":\"FUN\",\"NEO\":\"NEO\",\"GAS\":\"GAS\",\"PAX\":\"PAX\",\"USDC\":\"USDC\",\"ONT\":\"ONT\",\"XTZ\":\"XTZ\",\"LINK\":\"LINK\",\"RVN\":\"RVN\",\"BNBMAINNET\":\"BNBMAINNET\",\"ZIL\":\"ZIL\",\"BCD\":\"BCD\",\"USDT\":\"USDT\",\"USDTERC20\":\"USDTERC20\",\"CRO\":\"CRO\",\"DAI\":\"DAI\",\"HT\":\"HT\",\"WABI\":\"WABI\",\"BUSD\":\"BUSD\",\"ALGO\":\"ALGO\",\"USDTTRC20\":\"USDTTRC20\",\"GT\":\"GT\",\"STPT\":\"STPT\",\"AVA\":\"AVA\",\"SXP\":\"SXP\",\"UNI\":\"UNI\",\"OKB\":\"OKB\",\"BTC\":\"BTC\"}', '1', '', NULL, NULL, '2023-02-14 10:42:09');


INSERT INTO `gateways` (`form_id`, `code`, `name`, `alias`, `status`, `gateway_parameters`, `supported_currencies`, `crypto`, `extra`, `description`, `created_at`, `updated_at`) VALUES ('0', '509', 'Now payments checkout', 'NowPaymentsCheckout', '1', '{\"api_key\":{\"title\":\"API Key\",\"global\":true,\"value\":\"-------------------\"},\"secret_key\":{\"title\":\"Secret Key\",\"global\":true,\"value\":\"--------------\"}}', '{\"BTG\":\"BTG\",\"ETH\":\"ETH\",\"XMR\":\"XMR\",\"ZEC\":\"ZEC\",\"XVG\":\"XVG\",\"ADA\":\"ADA\",\"LTC\":\"LTC\",\"BCH\":\"BCH\",\"QTUM\":\"QTUM\",\"DASH\":\"DASH\",\"XLM\":\"XLM\",\"XRP\":\"XRP\",\"XEM\":\"XEM\",\"DGB\":\"DGB\",\"LSK\":\"LSK\",\"DOGE\":\"DOGE\",\"TRX\":\"TRX\",\"KMD\":\"KMD\",\"REP\":\"REP\",\"BAT\":\"BAT\",\"ARK\":\"ARK\",\"WAVES\":\"WAVES\",\"BNB\":\"BNB\",\"XZC\":\"XZC\",\"NANO\":\"NANO\",\"TUSD\":\"TUSD\",\"VET\":\"VET\",\"ZEN\":\"ZEN\",\"GRS\":\"GRS\",\"FUN\":\"FUN\",\"NEO\":\"NEO\",\"GAS\":\"GAS\",\"PAX\":\"PAX\",\"USDC\":\"USDC\",\"ONT\":\"ONT\",\"XTZ\":\"XTZ\",\"LINK\":\"LINK\",\"RVN\":\"RVN\",\"BNBMAINNET\":\"BNBMAINNET\",\"ZIL\":\"ZIL\",\"BCD\":\"BCD\",\"USDT\":\"USDT\",\"USDTERC20\":\"USDTERC20\",\"CRO\":\"CRO\",\"DAI\":\"DAI\",\"HT\":\"HT\",\"WABI\":\"WABI\",\"BUSD\":\"BUSD\",\"ALGO\":\"ALGO\",\"USDTTRC20\":\"USDTTRC20\",\"GT\":\"GT\",\"STPT\":\"STPT\",\"AVA\":\"AVA\",\"SXP\":\"SXP\",\"UNI\":\"UNI\",\"OKB\":\"OKB\",\"BTC\":\"BTC\"}', '1', '', NULL, NULL, '2023-02-14 10:42:09');


CREATE TABLE `update_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `version` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `update_log` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

ALTER TABLE `update_logs`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `update_logs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;


ALTER TABLE `admin_password_resets` CHANGE `status` `status` TINYINT(1) NOT NULL DEFAULT '1';
ALTER TABLE `deposits` CHANGE `try` `payment_try` INT(10) NOT NULL DEFAULT '0';

ALTER TABLE `general_settings` ADD `multi_language` TINYINT(1) NOT NULL DEFAULT '1' AFTER `agree`;

ALTER TABLE `general_settings` ADD `system_customized` TINYINT(1) NOT NULL DEFAULT '0' AFTER `system_info`;

ALTER TABLE `general_settings` ADD `last_cron` DATETIME NULL DEFAULT NULL AFTER `referral_commission_count`;

ALTER TABLE `general_settings`
  DROP `last_dps_cron`,
  DROP `last_fdr_cron`,
  DROP `last_loan_cron`;


CREATE TABLE `cron_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `alias` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `action` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cron_schedule_id` int(11) NOT NULL DEFAULT 0,
  `next_run` datetime DEFAULT NULL,
  `last_run` datetime DEFAULT NULL,
  `is_running` tinyint(1) NOT NULL DEFAULT 1,
  `is_default` tinyint(4) 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;


CREATE TABLE `cron_job_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `cron_job_id` int(11) NOT NULL DEFAULT 0,
  `start_at` datetime DEFAULT NULL,
  `end_at` datetime DEFAULT NULL,
  `duration` int(11) NOT NULL DEFAULT 0,
  `error` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


CREATE TABLE `cron_schedules` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `interval` int(11) NOT NULL DEFAULT 0,
  `status` 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;


ALTER TABLE `cron_jobs`
  ADD PRIMARY KEY (`id`);

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

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

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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


CREATE TABLE `permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `group` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`);

  
ALTER TABLE `permissions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

INSERT INTO `permissions` (`id`, `name`, `group`, `code`) VALUES
(1, 'Dashboard', 'AdminController', 'admin.dashboard'),
(2, 'All Staff', 'StaffController', 'admin.staff.index'),
(3, 'Add New Staff', 'StaffController', 'admin.staff.save'),
(4, 'Change Staff Status', 'StaffController', 'admin.staff.status'),
(5, 'Staff Login', 'StaffController', 'admin.staff.login'),
(6, 'Roles', 'RolesController', 'admin.roles.index'),
(7, 'Add New Role - Page', 'RolesController', 'admin.roles.add'),
(8, 'Update Role - Page', 'RolesController', 'admin.roles.edit'),
(9, 'Add/Update Role', 'RolesController', 'admin.roles.save'),
(10, 'Notifications', 'AdminController', 'admin.notifications'),
(11, 'Notification Mark As Read', 'AdminController', 'admin.notification.read'),
(12, 'Notifications Mark All As Read', 'AdminController', 'admin.notifications.readAll'),
(13, 'Request Report', 'AdminController', 'admin.request.report'),
(14, 'Submit Request Report', 'AdminController', 'admin.request.report.submit'),
(15, 'View Beneficiary Details', 'AdminController', 'admin.beneficiary.details'),
(16, 'Download Attachment', 'AdminController', 'admin.download.attachment'),
(17, 'All Users', 'ManageUsersController', 'admin.users.all'),
(18, 'Active Users', 'ManageUsersController', 'admin.users.active'),
(19, 'Banned Users', 'ManageUsersController', 'admin.users.banned'),
(20, 'Email Verified Users', 'ManageUsersController', 'admin.users.email.verified'),
(21, 'Email Unverified Users', 'ManageUsersController', 'admin.users.email.unverified'),
(22, 'Mobile Unverified Users', 'ManageUsersController', 'admin.users.mobile.unverified'),
(23, 'Kyc Verified Users', 'ManageUsersController', 'admin.users.kyc.verified'),
(24, 'Kyc Unverified Users', 'ManageUsersController', 'admin.users.kyc.unverified'),
(25, 'Kyc Pending Users', 'ManageUsersController', 'admin.users.kyc.pending'),
(26, 'Mobile Verified Users', 'ManageUsersController', 'admin.users.mobile.verified'),
(27, 'Users With Balance', 'ManageUsersController', 'admin.users.with.balance'),
(28, 'Owes Users', 'ManageUsersController', 'admin.users.owes'),
(29, 'Owes Dps Users', 'ManageUsersController', 'admin.users.owes.dps'),
(30, 'Owes Loan Users', 'ManageUsersController', 'admin.users.owes.loan'),
(31, 'User Detail', 'ManageUsersController', 'admin.users.detail'),
(32, 'User Kyc Details', 'ManageUsersController', 'admin.users.kyc.details'),
(33, 'Kyc Approve', 'ManageUsersController', 'admin.users.kyc.approve'),
(34, 'Kyc Reject', 'ManageUsersController', 'admin.users.kyc.reject'),
(35, 'User Update', 'ManageUsersController', 'admin.users.update'),
(36, 'User Balance Addition Subtraction', 'ManageUsersController', 'admin.users.add.sub.balance'),
(37, 'Send Notification To Single User - Page', 'ManageUsersController', 'admin.users.notification.single'),
(39, 'Login As User', 'ManageUsersController', 'admin.users.login'),
(40, 'Change User Status', 'ManageUsersController', 'admin.users.status'),
(41, 'Send Notification To All Users - Page', 'ManageUsersController', 'admin.users.notification.all'),
(42, 'Send Notification To All Users', 'ManageUsersController', 'admin.users.notification.all.send'),
(43, 'Users Notification Log', 'ManageUsersController', 'admin.users.notification.log'),
(44, 'View User Beneficiaries', 'ManageUsersController', 'admin.users.beneficiaries'),
(45, 'Subscribers', 'SubscriberController', 'admin.subscriber.index'),
(46, 'Send Email To Subscribers - Page', 'SubscriberController', 'admin.subscriber.send.email'),
(47, 'Remove Subscriber', 'SubscriberController', 'admin.subscriber.remove'),
(48, 'Send Email To Subscribers', 'SubscriberController', 'admin.subscriber.send.email.submit'),
(49, 'Automatic Gateway', 'AutomaticGatewayController', 'admin.gateway.automatic.index'),
(50, 'Update Automatic Gateway - Page', 'AutomaticGatewayController', 'admin.gateway.automatic.edit'),
(51, 'Update Automatic Gateway', 'AutomaticGatewayController', 'admin.gateway.automatic.update'),
(52, 'Remove Automatic Gateway', 'AutomaticGatewayController', 'admin.gateway.automatic.remove'),
(53, 'Change Automatic Gateway Status', 'AutomaticGatewayController', 'admin.gateway.automatic.status'),
(54, 'Manual Gateway', 'ManualGatewayController', 'admin.gateway.manual.index'),
(55, 'Create Manual Gateway - Page', 'ManualGatewayController', 'admin.gateway.manual.create'),
(56, 'Create Gateway Manual', 'ManualGatewayController', 'admin.gateway.manual.store'),
(57, 'Update Manual Gateway - Page', 'ManualGatewayController', 'admin.gateway.manual.edit'),
(58, 'Update Manual Gateway', 'ManualGatewayController', 'admin.gateway.manual.update'),
(59, 'Change Manual Gateway Status', 'ManualGatewayController', 'admin.gateway.manual.status'),
(60, 'Deposits', 'DepositController', 'admin.deposit.list'),
(61, 'Pending Deposits', 'DepositController', 'admin.deposit.pending'),
(62, 'Rejected Deposits', 'DepositController', 'admin.deposit.rejected'),
(63, 'Approved Deposits', 'DepositController', 'admin.deposit.approved'),
(64, 'Successful Deposits', 'DepositController', 'admin.deposit.successful'),
(65, 'Initiated Deposits', 'DepositController', 'admin.deposit.initiated'),
(66, 'Deposit Details', 'DepositController', 'admin.deposit.details'),
(67, 'Reject Deposit', 'DepositController', 'admin.deposit.reject'),
(68, 'Approve Deposit', 'DepositController', 'admin.deposit.approve'),
(69, 'Pending Withdrawals', 'WithdrawalController', 'admin.withdraw.pending'),
(70, 'Approved Withdrawals', 'WithdrawalController', 'admin.withdraw.approved'),
(71, 'Rejected Withdrawals', 'WithdrawalController', 'admin.withdraw.rejected'),
(72, 'All Withdrawals', 'WithdrawalController', 'admin.withdraw.log'),
(73, 'Withdrawal Details', 'WithdrawalController', 'admin.withdraw.details'),
(74, 'Approve Withdrawal', 'WithdrawalController', 'admin.withdraw.approve'),
(75, 'Reject Withdrawal', 'WithdrawalController', 'admin.withdraw.reject'),
(76, 'Withdrawal Methods', 'WithdrawMethodController', 'admin.withdraw.method.index'),
(77, 'Create Withdrawal Method - Page', 'WithdrawMethodController', 'admin.withdraw.method.create'),
(78, 'Create Withdrawal Method', 'WithdrawMethodController', 'admin.withdraw.method.store'),
(79, 'Update Withdrawal Method - Page', 'WithdrawMethodController', 'admin.withdraw.method.edit'),
(80, 'Update Withdrawal Method', 'WithdrawMethodController', 'admin.withdraw.method.update'),
(81, 'Change Withdrawal Method Status', 'WithdrawMethodController', 'admin.withdraw.method.status'),
(82, 'Transaction Log', 'ReportController', 'admin.report.transaction'),
(83, 'Login History', 'ReportController', 'admin.report.login.history'),
(84, 'Login IpHistory', 'ReportController', 'admin.report.login.ipHistory'),
(85, 'Notification History', 'ReportController', 'admin.report.notification.history'),
(86, 'Email Details', 'ReportController', 'admin.report.email.details'),
(87, 'All Ticket', 'SupportTicketController', 'admin.ticket.index'),
(88, 'Pending Ticket', 'SupportTicketController', 'admin.ticket.pending'),
(89, 'Closed Ticket', 'SupportTicketController', 'admin.ticket.closed'),
(90, 'Answered Ticket', 'SupportTicketController', 'admin.ticket.answered'),
(91, 'View Ticket', 'SupportTicketController', 'admin.ticket.view'),
(92, 'Reply Ticket', 'SupportTicketController', 'admin.ticket.reply'),
(93, 'Close Ticket', 'SupportTicketController', 'admin.ticket.close'),
(94, 'Download Ticket', 'SupportTicketController', 'admin.ticket.download'),
(95, 'Delete Ticket', 'SupportTicketController', 'admin.ticket.delete'),
(96, 'Language', 'LanguageController', 'admin.language.manage'),
(97, 'Add New Language', 'LanguageController', 'admin.language.manage.store'),
(98, 'Delete Language', 'LanguageController', 'admin.language.manage.delete'),
(99, 'Update Language', 'LanguageController', 'admin.language.manage.update'),
(100, 'Add Language Key - Page', 'LanguageController', 'admin.language.key'),
(101, 'Import Language Keywords', 'LanguageController', 'admin.language.import.lang'),
(102, 'Add Language Key', 'LanguageController', 'admin.language.store.key'),
(103, 'Delete Language Key', 'LanguageController', 'admin.language.delete.key'),
(104, 'Update Language Key', 'LanguageController', 'admin.language.update.key'),
(105, 'General Setting', 'GeneralSettingController', 'admin.setting.index'),
(106, 'Update General Setting', 'GeneralSettingController', 'admin.setting.update'),
(107, 'System Configuration', 'GeneralSettingController', 'admin.setting.system.configuration'),
(108, 'Update System Configuration', 'GeneralSettingController', 'admin.setting.system.configuration.submit'),
(109, 'Logo & Favicon', 'GeneralSettingController', 'admin.setting.logo.icon'),
(110, 'Update Logo & Favicon', 'GeneralSettingController', 'admin.setting.logo.icon.update'),
(111, 'Custom Css', 'GeneralSettingController', 'admin.setting.custom.css'),
(112, 'Update Custom Css', 'GeneralSettingController', 'admin.setting.custom.css.submit'),
(113, 'Cookie Policy', 'GeneralSettingController', 'admin.setting.cookie'),
(114, 'Update Cookie Policy', 'GeneralSettingController', 'admin.setting.cookie.submit'),
(115, 'Maintenance Mode - Page', 'GeneralSettingController', 'admin.maintenance.mode'),
(116, 'Update Maintenance Mode', 'GeneralSettingController', 'admin.maintenance.mode.submit'),
(117, 'Kyc Setting - Page', 'KycController', 'admin.kyc.setting'),
(118, 'Update Kyc Setting', 'KycController', 'admin.kyc.setting.submit'),
(119, 'Referral Setting', 'ReferralSettingController', 'admin.referral.setting'),
(120, 'Update Referral Setting', 'ReferralSettingController', 'admin.referral.setting.save'),
(121, 'Count Referral Setting', 'ReferralSettingController', 'admin.referral.setting.count'),
(122, 'Global Template', 'NotificationController', 'admin.setting.notification.global'),
(123, 'Update Global Template', 'NotificationController', 'admin.setting.notification.global.update'),
(124, 'Templates', 'NotificationController', 'admin.setting.notification.templates'),
(125, 'Update Templates - Page', 'NotificationController', 'admin.setting.notification.template.edit'),
(126, 'Update Templates', 'NotificationController', 'admin.setting.notification.template.update'),
(127, 'Email Setting', 'NotificationController', 'admin.setting.notification.email'),
(129, 'Test Email', 'NotificationController', 'admin.setting.notification.email.test'),
(130, 'Sms Setting', 'NotificationController', 'admin.setting.notification.sms'),
(132, 'Test Sms', 'NotificationController', 'admin.setting.notification.sms.test'),
(133, 'Push Notification - Page', 'NotificationController', 'admin.setting.notification.push'),
(134, 'Update Push Notification', 'NotificationController', 'admin.setting.notification.push.setting'),
(135, 'Extensions', 'ExtensionController', 'admin.extensions.index'),
(136, 'Update Extensions', 'ExtensionController', 'admin.extensions.update'),
(137, 'Change Extensions Status', 'ExtensionController', 'admin.extensions.status'),
(138, 'Application System Info', 'SystemController', 'admin.system.info'),
(139, 'Server System Info', 'SystemController', 'admin.system.server.info'),
(140, 'System Optimize - Page', 'SystemController', 'admin.system.optimize'),
(141, 'Clear System Cache', 'SystemController', 'admin.system.optimize.clear'),
(142, 'Seo Manager', 'FrontendController', 'admin.seo'),
(143, 'Manage Templates - Page', 'FrontendController', 'admin.frontend.templates'),
(144, 'Set Active Templates', 'FrontendController', 'admin.frontend.templates.active'),
(145, 'Frontend Sections - Page', 'FrontendController', 'admin.frontend.sections'),
(146, 'Update Frontend Sections Content', 'FrontendController', 'admin.frontend.sections.content'),
(147, 'Frontend Sections Element - Page', 'FrontendController', 'admin.frontend.sections.element'),
(148, 'Remove Frontend Section', 'FrontendController', 'admin.frontend.remove'),
(149, 'Manage Pages', 'PageBuilderController', 'admin.frontend.manage.pages'),
(150, 'Add New Page', 'PageBuilderController', 'admin.frontend.manage.pages.save'),
(151, 'Update Page', 'PageBuilderController', 'admin.frontend.manage.pages.update'),
(152, 'Delete Page', 'PageBuilderController', 'admin.frontend.manage.pages.delete'),
(153, 'Manage Section - Page', 'PageBuilderController', 'admin.frontend.manage.section'),
(154, 'Update Manage Section', 'PageBuilderController', 'admin.frontend.manage.section.update'),
(155, 'All Loans', 'LoanPlanController', 'admin.plans.loan.index'),
(156, 'Add New Loan - Page', 'LoanPlanController', 'admin.plans.loan.create'),
(157, 'Update Loan - Page', 'LoanPlanController', 'admin.plans.loan.edit'),
(158, 'Add / Update Loan', 'LoanPlanController', 'admin.plans.loan.save'),
(159, 'Change Loan Status', 'LoanPlanController', 'admin.plans.loan.status'),
(160, 'Dps', 'DpsPlanController', 'admin.plans.dps.index'),
(161, 'Add New Dps  - Page', 'DpsPlanController', 'admin.plans.dps.add'),
(162, 'Update Dps - Page', 'DpsPlanController', 'admin.plans.dps.edit'),
(163, 'Add / Update Dps', 'DpsPlanController', 'admin.plans.dps.save'),
(164, 'Change Dps Status', 'DpsPlanController', 'admin.plans.dps.status'),
(165, 'Fdr', 'FdrPlanController', 'admin.plans.fdr.index'),
(166, 'Add / Update Fdr', 'FdrPlanController', 'admin.plans.fdr.save'),
(167, 'Change Fdr Status', 'FdrPlanController', 'admin.plans.fdr.status'),
(168, 'Loan Index', 'LoanController', 'admin.loan.index'),
(169, 'Running Loans', 'LoanController', 'admin.loan.running'),
(170, 'Pending Loans', 'LoanController', 'admin.loan.pending'),
(171, 'Rejected Loans', 'LoanController', 'admin.loan.rejected'),
(172, 'Paid Loans', 'LoanController', 'admin.loan.paid'),
(173, 'Due Loans', 'LoanController', 'admin.loan.due'),
(174, 'Approve Loan', 'LoanController', 'admin.loan.approve'),
(175, 'Reject Loan', 'LoanController', 'admin.loan.reject'),
(176, 'Loan Details', 'LoanController', 'admin.loan.details'),
(177, 'Loan Installments', 'LoanController', 'admin.loan.installments'),
(178, 'All Dps', 'DpsController', 'admin.dps.index'),
(179, 'Running Dps', 'DpsController', 'admin.dps.running'),
(180, 'Matured Dps', 'DpsController', 'admin.dps.matured'),
(181, 'Closed Dps', 'DpsController', 'admin.dps.closed'),
(182, 'Due Dps', 'DpsController', 'admin.dps.due'),
(183, 'Installments Dps', 'DpsController', 'admin.dps.installments'),
(184, 'All Fdr', 'FdrController', 'admin.fdr.index'),
(185, 'Running Fdr', 'FdrController', 'admin.fdr.running'),
(186, 'Closed Fdr', 'FdrController', 'admin.fdr.closed'),
(187, 'Due Fdr', 'FdrController', 'admin.fdr.due'),
(188, 'Fdr Due Pay', 'FdrController', 'admin.fdr.due.pay'),
(189, 'Fdr Installments', 'FdrController', 'admin.fdr.installments'),
(190, 'Add New Bank - Page', 'OtherBankController', 'admin.bank.create'),
(191, 'Add / Update Bank', 'OtherBankController', 'admin.bank.store'),
(192, 'Update Bank - Page', 'OtherBankController', 'admin.bank.edit'),
(193, 'Other Banks', 'OtherBankController', 'admin.bank.index'),
(194, 'Change Status Bank', 'OtherBankController', 'admin.bank.change.status'),
(195, 'Wire Transfer Setting', 'WireTransferSettingController', 'admin.wire.transfer.setting'),
(197, 'Wire Transfer Form', 'WireTransferSettingController', 'admin.wire.transfer.form'),
(199, 'All Transfers', 'MoneyTransferController', 'admin.transfers.index'),
(200, 'Pending Transfers', 'MoneyTransferController', 'admin.transfers.pending'),
(201, 'Rejected Transfers', 'MoneyTransferController', 'admin.transfers.rejected'),
(202, 'Own Bank Transfer', 'MoneyTransferController', 'admin.transfers.own'),
(203, 'Other Bank Transfer', 'MoneyTransferController', 'admin.transfers.other'),
(204, 'Wire Transfers', 'MoneyTransferController', 'admin.transfers.wire'),
(205, 'Transfers Details', 'MoneyTransferController', 'admin.transfers.details'),
(206, 'Reject Transfers', 'MoneyTransferController', 'admin.transfers.reject'),
(207, 'Complete Transfers', 'MoneyTransferController', 'admin.transfers.complete'),
(208, 'All Branches', 'BranchController', 'admin.branch.index'),
(209, 'Add New Branch - Page', 'BranchController', 'admin.branch.add'),
(210, 'Branch Details', 'BranchController', 'admin.branch.details'),
(211, 'Add / Update Branch', 'BranchController', 'admin.branch.save'),
(212, 'Change Branch Status', 'BranchController', 'admin.branch.status'),
(213, 'Branch Staff', 'BranchStaffController', 'admin.branch.staff.index'),
(214, 'Add New Branch Staff', 'BranchStaffController', 'admin.branch.staff.add'),
(215, 'Branch Staff Details', 'BranchStaffController', 'admin.branch.staff.details'),
(216, 'Add / Update Branch Staff', 'BranchStaffController', 'admin.branch.staff.save'),
(217, 'Change Branch Staff Status', 'BranchStaffController', 'admin.branch.staff.status'),
(218, 'Login As Branch Staff', 'BranchStaffController', 'admin.branch.staff.login'),
(219, 'Update Email Notification', 'NotificationController', 'admin.setting.notification.email.update'),
(220, 'Update Sms Notification', 'NotificationController', 'admin.setting.notification.sms.update'),
(221, 'Update Wire Transfer Setting', 'WireTransferSettingController', 'admin.wire.transfer.setting.save'),
(222, 'Update Wire Transfer Form', 'WireTransferSettingController', 'admin.wire.transfer.form.save'),
(223, 'Send Notification To Single User', 'ManageUsersController', 'admin.users.notification.single.send'),
(224, 'Language Get Key', 'LanguageController', 'admin.language.get.key'),
(225, 'System Update', 'SystemController', 'admin.system.update'),
(226, 'System Update Upload', 'SystemController', 'admin.system.update.upload'),
(227, 'All Cron List', 'CronConfigurationController', 'admin.cron.index'),
(228, 'Add new Cron', 'CronConfigurationController', 'admin.cron.store'),
(229, 'Update Cron', 'CronConfigurationController', 'admin.cron.update'),
(230, 'Delete Cron', 'CronConfigurationController', 'admin.cron.delete'),
(231, 'Cron Schedule List', 'CronConfigurationController', 'admin.cron.schedule'),
(232, 'Add new Cron Schedule', 'CronConfigurationController', 'admin.cron.schedule.store'),
(233, 'Change Cron Schedule Status', 'CronConfigurationController', 'admin.cron.schedule.status'),
(234, 'Pause Cron Schedule', 'CronConfigurationController', 'admin.cron.schedule.pause'),
(235, 'Cron Schedule Logs', 'CronConfigurationController', 'admin.cron.schedule.logs'),
(236, 'Cron Schedule Log Resolved', 'CronConfigurationController', 'admin.cron.schedule.log.resolved'),
(237, 'Cron Log Flush', 'CronConfigurationController', 'admin.cron.log.flush');



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


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



ALTER TABLE `permission_role`
  ADD PRIMARY KEY (`id`);


ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`);


ALTER TABLE `permission_role`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

ALTER TABLE `roles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;


ALTER TABLE `admins` ADD `role_id` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `id`;
ALTER TABLE `admins` ADD `status` TINYINT(1) NOT NULL DEFAULT '1' AFTER `password`;


INSERT INTO `cron_jobs` (`name`, `alias`, `action`, `url`, `cron_schedule_id`, `next_run`, `last_run`, `is_running`, `is_default`, `created_at`, `updated_at`) VALUES
('Loan Cron', 'loan_cron', '[\"App\\\\Http\\\\Controllers\\\\CronController\", \"loan\"]', NULL, 1, '2023-06-24 12:30:08', '2023-06-24 12:25:08', 1, 1, '2023-06-21 23:29:14', '2023-06-24 06:25:08'),('Dps Cron', 'dps_cron', '[\"App\\\\Http\\\\Controllers\\\\CronController\", \"dps\"]', NULL, 1, '2023-06-24 12:30:08', '2023-06-24 12:25:08', 1, 1, '2023-06-21 23:29:14', '2023-06-24 06:25:08'),('Fdr Cron', 'fdr_cron', '[\"App\\\\Http\\\\Controllers\\\\CronController\", \"fdr\"]', NULL, 1, '2023-06-24 12:30:08', '2023-06-24 12:25:08', 1, 1, '2023-06-21 23:29:14', '2023-06-24 06:25:08');

INSERT INTO `cron_schedules` (`id`, `name`, `interval`, `status`, `created_at`, `updated_at`) VALUES
(1, '5 Minutes', 300, 1, '2023-07-22 10:03:29', '2023-07-22 10:03:29'),
(2, '10 Minutes', 600, 1, '2023-07-22 10:03:35', '2023-07-22 10:03:35');