CREATE TABLE `company_sms` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `company_id` bigint unsigned NOT NULL,
  `sms_units` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `company_sms_company_id_foreign` (`company_id`),
  CONSTRAINT `company_sms_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `company_sms`
--


--
-- Table structure for table `company_sms_provider_entities`
--

CREATE TABLE `company_sms_provider_entities` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `company_sms_provider_id` bigint unsigned NOT NULL,
  `requirement_id` int NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `company_sms_provider_entities_company_sms_provider_id_foreign` (`company_sms_provider_id`),
  CONSTRAINT `company_sms_provider_entities_company_sms_provider_id_foreign` FOREIGN KEY (`company_sms_provider_id`) REFERENCES `company_sms_providers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `company_sms_provider_entities`
--

INSERT INTO `company_sms_provider_entities` VALUES (1,1,7,'La Zungu','2025-09-01 06:07:22','2025-09-01 06:07:22',NULL),(2,1,8,'1152|z0RRuHr8EQLxtqTMo5WPUNrXJIYYbl5Q2BJpWKiN43a0aece','2025-09-01 06:07:22','2025-09-01 06:07:22',NULL),(3,2,7,'La Zungu','2025-09-01 06:15:21','2025-09-01 06:15:21',NULL),(4,2,8,'1152|z0RRuHr8EQLxtqTMo5WPUNrXJIYYbl5Q2BJpWKiN43a0aece','2025-09-01 06:15:21','2025-09-01 06:15:21',NULL),(5,3,7,'La Zungu','2025-09-01 06:16:04','2025-09-01 06:16:04',NULL),(6,3,8,'1152|z0RRuHr8EQLxtqTMo5WPUNrXJIYYbl5Q2BJpWKiN43a0aece','2025-09-01 06:16:04','2025-09-01 06:16:04',NULL);

--
-- Table structure for table `company_sms_providers`
--

CREATE TABLE `company_sms_providers` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `company_id` bigint unsigned NOT NULL,
  `sms_provider_id` bigint unsigned NOT NULL,
  `status` int NOT NULL DEFAULT '1' COMMENT '0=inactive, 1=active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `company_sms_providers_company_id_foreign` (`company_id`),
  KEY `company_sms_providers_sms_provider_id_foreign` (`sms_provider_id`),
  CONSTRAINT `company_sms_providers_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE,
  CONSTRAINT `company_sms_providers_sms_provider_id_foreign` FOREIGN KEY (`sms_provider_id`) REFERENCES `sms_providers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `company_sms_providers`
--

INSERT INTO `company_sms_providers` VALUES (1,13,4,1,'2025-09-01 06:06:35','2025-09-01 06:14:22','2025-09-01 06:14:22'),(2,13,4,1,'2025-09-01 06:15:21','2025-09-01 06:15:34','2025-09-01 06:15:34'),(3,13,4,1,'2025-09-01 06:16:04','2025-09-01 06:16:04',NULL);

--
-- Table structure for table `company_sms_templates`
--

CREATE TABLE `company_sms_templates` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `company_id` int DEFAULT NULL,
  `sms_template_type_id` bigint unsigned NOT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` int NOT NULL DEFAULT '0' COMMENT '0=inactive, 1=active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `company_sms_templates_sms_template_type_id_foreign` (`sms_template_type_id`),
  CONSTRAINT `company_sms_templates_sms_template_type_id_foreign` FOREIGN KEY (`sms_template_type_id`) REFERENCES `sms_template_types` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `company_sms_templates`
--

INSERT INTO `company_sms_templates` VALUES (1,0,1,'Dear [name], your internet plan is expiring in [expiry_days] day(s). Kindly make the payment at your earliest convenience to avoid service interruptions. Pay via paybill - [paybill] and account number [account_number]',1,'2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(2,0,2,'Dear [name], your invoice for [month] amounting to Ksh [balance] has been generated. Please pay via paybill - [paybill] and account number [account_number]',1,'2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(3,0,3,'Hello [name], this is to confirm that we have received your payment of Ksh [amount] for [month]. Your current balance as of now is Ksh [balance]',1,'2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(4,0,4,'Dear [name], this is a reminder that your payment of Tsh [balance] for [month] is due. Kindly make the payment at your earliest convenience to avoid service interruptions. Pay via paybill - [paybill] and account number [account_number]',1,'2025-08-03 19:10:09','2025-09-23 09:01:32',NULL),(5,0,5,'Dear [name], your payment of Ksh [balance] for [month] is overdue. Please settle the outstanding amount immediately to avoid service disruption. Pay via paybill - [paybill] and account number [account_number]',1,'2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(6,0,6,'Hello [name], due to an overdue balance of [balance], your service has been disconnected. To restore the services, please pay Ksh [balance] to paybill - [paybill] using account number [account_number]',1,'2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(7,0,7,'Hello [name], we are excited to have you on board! Your subscription to [internet_plan] is now active. If you have any questions, feel free to contact us. Thank you',1,'2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(8,0,8,'Hello [name], we are excited to have you on board! Your subscription to [internet_plan] is now active. If you have any questions, feel free to contact us.',1,'2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(9,0,9,'Dear [name], your request to change your plan to [internet_plan] has been processed successfully. Your new plan is now active. Contact us if you need assistance.',1,'2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(10,0,10,'Dear [name], we will be performing maintenance on 1st Jan 2025 from 09:30am to 11:30am. Service may be temporarily affected. Thank you for your patience.',1,'2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(11,0,11,'Dear [name], we are aware of an ongoing service disruption in your area. Our team is investigating and will restore service as soon as possible.',1,'2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(12,0,12,'Greetings, thank you for purchasing [plan] plan worthy [amount]. Please use [username] as the username and [password] as your password to reconnect yourself. Your subscription expires at [expiry_date].',1,'2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(13,8,11,'Dear [name], we are aware of an ongoing service disruption in your area. Our team is investigating and will restore service as soon as possible.',1,'2025-08-22 21:17:08','2025-08-22 21:17:08',NULL),(14,8,12,'Greetings, thank you for purchasing [plan] plan worthy [amount]. Please use [username] as the username and [password] as your password to reconnect yourself. Your subscription expires at [expiry_date].',1,'2025-08-22 21:20:09','2025-08-22 21:20:09',NULL),(15,11,1,'Dear [name], your internet plan is expiring in [expiry_days] day(s). Kindly make the payment at your earliest convenience to avoid service interruptions. Pay via paybill - [paybill] and account number [account_number]',1,'2025-08-26 17:26:06','2025-08-26 17:26:06',NULL),(16,13,12,'Greetings, thank you for purchasing [plan] plan worthy [amount]. Please use [username] as the username and [password] as your password to reconnect yourself. Your subscription expires at [expiry_date].',1,'2025-08-29 22:04:52','2025-08-29 22:04:52',NULL),(17,13,11,'Dear [name], we are aware of an ongoing service disruption in your area. Our team is investigating and will restore service as soon as possible.',1,'2025-08-29 22:05:13','2025-08-29 22:05:13',NULL),(18,13,10,'Dear [name], we will be performing maintenance on 1st Jan 2025 from 09:30am to 11:30am. Service may be temporarily affected. Thank you for your patience.',1,'2025-08-29 22:05:34','2025-08-29 22:05:34',NULL),(19,13,9,'Dear [name], your request to change your plan to [internet_plan] has been processed successfully. Your new plan is now active. Contact us if you need assistance.',1,'2025-08-29 22:06:16','2025-08-29 22:06:16',NULL),(20,13,8,'Hello [name], we are excited to have you on board! Your subscription to [internet_plan] is now active. If you have any questions, feel free to contact us.',1,'2025-08-29 22:06:24','2025-08-29 22:06:24',NULL),(21,13,7,'Hello [name], we are excited to have you on board! Your subscription to [internet_plan] is now active. If you have any questions, feel free to contact us. Thank you',1,'2025-08-29 22:06:29','2025-08-29 22:06:29',NULL),(22,13,6,'Hello [name], due to an overdue balance of [balance], your service has been disconnected. To restore the services, please pay Ksh [balance] to paybill - [paybill] using account number [account_number]',1,'2025-08-29 22:06:35','2025-08-29 22:06:35',NULL),(23,13,5,'Dear [name], your payment of Ksh [balance] for [month] is overdue. Please settle the outstanding amount immediately to avoid service disruption. Pay via paybill - [paybill] and account number [account_number]',1,'2025-08-29 22:06:40','2025-08-29 22:06:40',NULL),(24,13,4,'Dear [name], this is a reminder that your payment of Ksh [balance] for [month] is due. Kindly make the payment at your earliest convenience to avoid service interruptions. Pay via paybill - [paybill] and account number [account_number]',1,'2025-08-29 22:06:46','2025-08-29 22:06:46',NULL),(25,13,3,'Hello [name], this is to confirm that we have received your payment of Ksh [amount] for [month]. Your current balance as of now is Ksh [balance]',1,'2025-08-29 22:06:51','2025-08-29 22:06:51',NULL),(26,13,2,'Dear [name], your invoice for [month] amounting to Ksh [balance] has been generated. Please pay via paybill - [paybill] and account number [account_number]',1,'2025-08-29 22:07:00','2025-08-29 22:07:00',NULL),(27,13,1,'Dear [name], your internet plan is expiring in [expiry_days] day(s). Kindly make the payment at your earliest convenience to avoid service interruptions. Pay via paybill - [paybill] and account number [account_number]',1,'2025-08-29 22:07:07','2025-08-29 22:07:07',NULL),(28,16,9,'Dear [name], your request to change your plan to [internet_plan] has been processed successfully. Your new plan is now active. Contact us if you need assistance.',0,'2025-09-06 06:57:59','2025-09-06 06:58:07',NULL);

--
-- Table structure for table `company_sms_usages`
--

CREATE TABLE `company_sms_usages` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `company_id` bigint unsigned NOT NULL,
  `sms_units` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `company_sms_usages_company_id_foreign` (`company_id`),
  CONSTRAINT `company_sms_usages_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `company_sms_usages`
--


--
-- Table structure for table `company_static_pages`
--

CREATE TABLE `company_static_pages` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `company_static_pages`
--


--
-- Table structure for table `company_users`
--

CREATE TABLE `company_users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `company_id` bigint unsigned NOT NULL,
  `user_id` bigint unsigned NOT NULL,
  `status` int NOT NULL DEFAULT '1' COMMENT '0=inactive, 1=active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `company_users_company_id_foreign` (`company_id`),
  KEY `company_users_user_id_foreign` (`user_id`),
  CONSTRAINT `company_users_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE,
  CONSTRAINT `company_users_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `company_users`
--

INSERT INTO `company_users` VALUES (8,8,15,1,'2025-08-05 16:56:56','2025-08-05 16:56:56',NULL),(11,11,20,1,'2025-08-26 13:06:13','2025-08-26 13:06:13',NULL),(14,13,22,1,'2025-08-29 19:10:58','2025-08-29 19:10:58',NULL),(15,14,23,1,'2025-08-30 06:58:45','2025-08-30 06:58:45',NULL),(16,8,24,1,'2025-08-31 22:17:44','2025-08-31 22:17:44',NULL),(17,15,15,1,'2025-09-03 20:05:20','2025-09-03 20:05:20',NULL),(18,16,25,1,'2025-09-06 06:09:37','2025-09-06 06:09:37',NULL),(19,16,26,1,'2025-09-06 13:01:40','2025-09-06 13:01:40',NULL),(20,17,27,0,'2025-09-09 09:33:08','2025-09-11 06:52:45',NULL),(21,18,28,1,'2025-09-18 14:24:23','2025-09-18 14:24:23',NULL);

--
-- Table structure for table `company_whatsapp_scans`
--

CREATE TABLE `company_whatsapp_scans` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `company_id` int DEFAULT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `company_whatsapp_scans`
--

INSERT INTO `company_whatsapp_scans` VALUES (1,0,'+254716100572','2025-09-10 08:04:10','2025-09-10 08:04:10',NULL),(2,0,'254716100572','2025-09-10 08:04:22','2025-09-10 08:04:22',NULL),(3,13,'+255754578434','2025-09-10 13:00:13','2025-09-10 13:00:13',NULL),(4,0,'+254796230626','2025-09-23 08:59:43','2025-09-23 08:59:43',NULL);

--
-- Table structure for table `customers`
--

CREATE TABLE `customers` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `first_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `last_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` int NOT NULL DEFAULT '0' COMMENT '0=pending, 1=sent',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customers`
--

INSERT INTO `customers` VALUES (1,'+2547222222222',NULL,NULL,NULL,0,'2025-08-11 23:41:45','2025-08-11 23:41:59','2025-08-11 23:41:59'),(2,NULL,NULL,NULL,NULL,0,'2025-08-11 23:43:58','2025-08-26 13:45:45',NULL);

--
-- Table structure for table `director_share_incomes`
--

CREATE TABLE `director_share_incomes` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `director_share_id` bigint unsigned NOT NULL,
  `grouped_transaction_id` bigint unsigned NOT NULL,
  `percentage_amount` decimal(8,2) NOT NULL DEFAULT '0.00',
  `amount` decimal(8,2) NOT NULL DEFAULT '0.00',
  `settled_status` int NOT NULL DEFAULT '0' COMMENT '0=pending, 1=sent',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `director_share_incomes_director_share_id_foreign` (`director_share_id`),
  KEY `director_share_incomes_grouped_transaction_id_foreign` (`grouped_transaction_id`),
  CONSTRAINT `director_share_incomes_director_share_id_foreign` FOREIGN KEY (`director_share_id`) REFERENCES `director_shares` (`id`) ON DELETE CASCADE,
  CONSTRAINT `director_share_incomes_grouped_transaction_id_foreign` FOREIGN KEY (`grouped_transaction_id`) REFERENCES `grouped_transactions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `director_share_incomes`
--

INSERT INTO `director_share_incomes` VALUES (1,1,1,50.00,10500.00,0,'2025-08-28 06:42:22','2025-08-28 06:42:22',NULL),(2,1,2,50.00,10500.00,0,'2025-09-10 17:38:47','2025-09-10 17:38:47',NULL),(3,1,3,50.00,10500.00,0,'2025-09-18 14:40:49','2025-09-18 14:40:49',NULL);

--
-- Table structure for table `director_share_payment_accounts`
--

CREATE TABLE `director_share_payment_accounts` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `ref_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `director_share_id` bigint unsigned NOT NULL,
  `payment_method_id` bigint unsigned NOT NULL,
  `bank_id` bigint unsigned DEFAULT NULL,
  `phone_account_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` int NOT NULL DEFAULT '1' COMMENT '0=inactive, 1=active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `director_share_payment_accounts_director_share_id_foreign` (`director_share_id`),
  KEY `director_share_payment_accounts_payment_method_id_foreign` (`payment_method_id`),
  KEY `director_share_payment_accounts_bank_id_foreign` (`bank_id`),
  CONSTRAINT `director_share_payment_accounts_bank_id_foreign` FOREIGN KEY (`bank_id`) REFERENCES `banks` (`id`) ON DELETE CASCADE,
  CONSTRAINT `director_share_payment_accounts_director_share_id_foreign` FOREIGN KEY (`director_share_id`) REFERENCES `director_shares` (`id`) ON DELETE CASCADE,
  CONSTRAINT `director_share_payment_accounts_payment_method_id_foreign` FOREIGN KEY (`payment_method_id`) REFERENCES `payment_methods` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `director_share_payment_accounts`
--


--
-- Table structure for table `director_shares`
--

CREATE TABLE `director_shares` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `ref_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `names` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `percentage_amount` decimal(8,2) NOT NULL DEFAULT '0.00',
  `status` int NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `director_shares`
--

INSERT INTO `director_shares` VALUES (1,'DS001','Jared Maera','+254716100572','maerajared12@gmail.com',50.00,1,'2025-08-03 19:10:08','2025-08-03 19:10:08',NULL),(2,'DS002','Dennis Bogonko','+254720579706','bogonkomokaya92@gmail.com',30.00,1,'2025-08-03 19:10:08','2025-08-03 19:10:08',NULL),(3,'DS003','Jaem Net','0716327828','info@jaemnet.com',20.00,1,'2025-08-03 19:10:08','2025-08-03 19:10:08',NULL);

--
-- Table structure for table `escrow_transactions`
--

CREATE TABLE `escrow_transactions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `ref_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `company_id` int DEFAULT NULL,
  `company_router_id` int DEFAULT NULL,
  `payment_mode_id` bigint unsigned NOT NULL,
  `phone_used` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `transaction_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(8,2) NOT NULL DEFAULT '0.00',
  `checkout_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `escrow_transactions_payment_mode_id_foreign` (`payment_mode_id`),
  CONSTRAINT `escrow_transactions_payment_mode_id_foreign` FOREIGN KEY (`payment_mode_id`) REFERENCES `payment_modes` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `escrow_transactions`
--


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

CREATE TABLE `expenses` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `ref_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(8,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `expenses`
--


--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `failed_jobs`
--


--
-- Table structure for table `failed_transactions`
--

CREATE TABLE `failed_transactions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `payment_mode_id` bigint unsigned NOT NULL,
  `checkout_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `failed_transactions_payment_mode_id_foreign` (`payment_mode_id`),
  CONSTRAINT `failed_transactions_payment_mode_id_foreign` FOREIGN KEY (`payment_mode_id`) REFERENCES `payment_modes` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `failed_transactions`
--


--
-- Table structure for table `grouped_transactions`
--

CREATE TABLE `grouped_transactions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `ref_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `transaction_type` int NOT NULL DEFAULT '1' COMMENT '1=invoice, 2=sms',
  `unit_sms_price` decimal(8,2) NOT NULL DEFAULT '0.00',
  `provider_sms_price` decimal(8,2) NOT NULL DEFAULT '0.00',
  `company_id` bigint unsigned NOT NULL,
  `company_router_id` int DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `payment_mode_id` bigint unsigned NOT NULL,
  `phone_used` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `transaction_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(8,2) NOT NULL DEFAULT '0.00',
  `checkout_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `grouped_transactions_company_id_foreign` (`company_id`),
  KEY `grouped_transactions_payment_mode_id_foreign` (`payment_mode_id`),
  CONSTRAINT `grouped_transactions_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE,
  CONSTRAINT `grouped_transactions_payment_mode_id_foreign` FOREIGN KEY (`payment_mode_id`) REFERENCES `payment_modes` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `grouped_transactions`
--

INSERT INTO `grouped_transactions` VALUES (1,'8I42E6',1,0.00,0.00,11,6,1,2,NULL,'THR178AWB',21000.00,NULL,NULL,'2025-08-28 06:42:22','2025-08-28 06:42:22',NULL),(2,'8RSZVT',1,0.00,0.00,17,10,1,2,NULL,'TI62NA5R2A',21000.00,NULL,NULL,'2025-09-10 17:38:47','2025-09-10 17:38:47',NULL),(3,'8BHOI7',1,0.00,0.00,18,11,1,2,NULL,'',21000.00,NULL,NULL,'2025-09-18 14:40:49','2025-09-18 14:40:49',NULL);

--
-- Table structure for table `ip_prefix_lengths`
--

CREATE TABLE `ip_prefix_lengths` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `prefix` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ip_prefix_lengths`
--

INSERT INTO `ip_prefix_lengths` VALUES (1,'8 (16,777,214 IPs)','8','2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(2,'12 (1,048,574 IPs)','12','2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(3,'16 (65,534 IPs)','16','2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(4,'20 (4,094 IPs)','20','2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(5,'24 (254 IPs)','24','2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(6,'28 (14 IPs)','28','2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(7,'30 (2 IPs)','30','2025-08-03 19:10:09','2025-08-03 19:10:09',NULL),(8,'32 (1 IP)','32','2025-08-03 19:10:09','2025-08-03 19:10:09',NULL);

--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_jobs` int NOT NULL,
  `pending_jobs` int NOT NULL,
  `failed_jobs` int NOT NULL,
  `failed_job_ids` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `options` mediumtext COLLATE utf8mb4_unicode_ci,
  `cancelled_at` int DEFAULT NULL,
  `created_at` int NOT NULL,
  `finished_at` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `job_batches`
--


--
-- Table structure for table `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `queue` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempts` tinyint unsigned NOT NULL,
  `reserved_at` int unsigned DEFAULT NULL,
  `available_at` int unsigned NOT NULL,
  `created_at` int unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `jobs_queue_index` (`queue`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `jobs`
--


--
-- Table structure for table `message_modes`
--

CREATE TABLE `message_modes` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` int NOT NULL DEFAULT '1' COMMENT '0=inactive, 1=active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `message_modes`
--

INSERT INTO `message_modes` VALUES (1,'SMS',1,'2025-08-03 19:10:04','2025-08-03 19:10:04',NULL),(2,'Email',1,'2025-08-03 19:10:04','2025-08-03 19:10:04',NULL),(3,'WhatsApp',1,'2025-08-03 19:10:04','2025-08-03 19:10:04',NULL);

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` VALUES (1,'0001_01_01_000000_create_users_table',1),(2,'0001_01_01_000001_create_cache_table',1),(3,'0001_01_01_000002_create_jobs_table',1),(4,'2024_12_31_100452_create_permission_tables',1),(5,'2024_12_31_100952_create_companies_table',1),(6,'2024_12_31_100953_create_payment_types_table',1),(7,'2024_12_31_100954_create_transaction_frequencies_table',1),(8,'2024_12_31_101150_create_company_users_table',1),(9,'2024_12_31_101616_create_service_plans_table',1),(10,'2024_12_31_101618_create_plan_validity_types_table',1),(11,'2024_12_31_101619_create_company_routers_table',1),(12,'2024_12_31_101857_create_company_ip_pools_table',1),(13,'2024_12_31_101858_create_company_service_plans_table',1),(14,'2024_12_31_174557_create_user_verification_codes_table',1),(15,'2024_12_31_181637_create_notifications_table',1),(16,'2024_12_31_213650_create_message_modes_table',1),(17,'2024_12_31_221743_create_sms_providers_table',1),(18,'2024_12_31_221919_create_sms_requirements_table',1),(19,'2024_12_31_221940_create_sms_provider_requirements_table',1),(20,'2024_12_31_221957_create_company_sms_providers_table',1),(21,'2024_12_31_222005_create_company_sms_provider_entities_table',1),(22,'2025_01_01_122817_create_company_email_configurations_table',1),(23,'2025_01_01_173315_create_company_customers_table',1),(24,'2025_01_02_125417_create_company_prepaid_vouchers_table',1),(25,'2025_01_03_162401_create_company_prepaid_users_table',1),(26,'2025_01_03_162402_create_payment_modes_table',1),(27,'2025_01_03_163433_create_company_grouped_transactions_table',1),(28,'2025_01_08_121255_create_company_bulk_messages_table',1),(29,'2025_01_08_213530_create_banks_table',1),(30,'2025_01_08_213531_create_payment_methods_table',1),(32,'2025_01_21_025009_create_company_static_pages_table',1),(33,'2025_01_22_020910_create_personal_access_tokens_table',1),(34,'2025_01_22_021305_create_failed_transactions_table',1),(35,'2025_01_22_022710_create_company_customer_service_plans_table',1),(36,'2025_01_22_151114_create_company_customer_invoices_table',1),(37,'2025_01_22_151543_create_company_customer_invoice_payments_table',1),(38,'2025_01_22_230339_create_grouped_transactions_table',1),(39,'2025_01_22_233047_create_company_router_invoices_table',1),(40,'2025_01_22_233054_create_company_router_invoice_payments_table',1),(41,'2025_01_24_174649_create_company_customer_service_plan_previous_debt_payments_table',1),(42,'2025_01_27_232712_create_company_referrals_table',1),(43,'2025_01_28_001754_create_company_referral_payments_table',1),(44,'2025_02_04_180817_create_company_escrow_transactions_table',1),(45,'2025_02_12_105715_create_paid_users_table',1),(46,'2025_02_16_144236_create_company_sms_table',1),(47,'2025_02_16_144254_create_company_sms_usages_table',1),(48,'2025_02_16_144918_create_expenses_table',1),(49,'2025_02_23_220746_create_customers_table',1),(50,'2025_02_24_231040_create_out_messages_table',1),(51,'2025_03_04_160220_create_company_router_interfaces_table',1),(52,'2025_03_08_213801_create_escrow_transactions_table',1),(53,'2025_03_08_213802_create_director_shares_table',1),(54,'2025_03_11_190100_create_outgoing_transactions_table',1),(55,'2025_03_13_115203_create_sms_template_types_table',1),(56,'2025_03_13_115729_create_company_sms_templates_table',1),(57,'2025_03_18_003524_create_company_customer_invoice_notify_rates_table',1),(58,'2025_03_20_010357_create_company_inventories_table',1),(59,'2025_03_20_124540_create_company_whatsapp_scans_table',1),(60,'2025_03_30_212850_create_potential_customers_table',1),(61,'2025_04_02_002642_create_paybill_transactions_table',1),(62,'2025_04_04_041618_create_director_share_incomes_table',1),(63,'2025_05_04_131513_create_b2b_outgoing_transaction_charges_table',1),(64,'2025_05_04_210449_create_outgoing_transaction_entities_table',1),(65,'2025_05_05_120828_create_temporary_grouped_transactions_table',1),(66,'2025_05_06_214708_create_b2c_outgoing_transaction_charges_table',1),(67,'2025_05_22_121943_create_tickets_table',1),(68,'2025_05_23_090344_create_ip_prefix_lengths_table',1),(69,'2025_05_25_122209_add_group_to_permissions_table',1),(70,'2025_06_02_232726_create_director_share_payment_accounts_table',1),(71,'2025_06_08_143800_create_company_router_customers_table',1),(72,'2025_07_04_013141_create_company_customer_service_plan_installation_items_table',1),(73,'2025_07_04_013148_create_company_customer_service_plan_installation_item_payments_table',1),(74,'2025_07_09_032524_create_client_to_be_disconnecteds_table',1),(77,'2025_08_01_223540_create_temporary_transaction_checks_table',2),(78,'2025_01_08_213816_create_company_payment_accounts_table',3);

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

CREATE TABLE `model_has_permissions` (
  `permission_id` bigint unsigned NOT NULL,
  `model_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint unsigned NOT NULL,
  PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`),
  CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `model_has_permissions`
--

INSERT INTO `model_has_permissions` VALUES (1,'App\\Models\\User',2),(1,'App\\Models\\User',3),(1,'App\\Models\\User',4),(1,'App\\Models\\User',5),(1,'App\\Models\\User',6),(1,'App\\Models\\User',7),(1,'App\\Models\\User',8),(1,'App\\Models\\User',9),(1,'App\\Models\\User',10),(1,'App\\Models\\User',11),(1,'App\\Models\\User',12),(1,'App\\Models\\User',13),(1,'App\\Models\\User',14),(1,'App\\Models\\User',15),(1,'App\\Models\\User',16),(1,'App\\Models\\User',17),(1,'App\\Models\\User',18),(1,'App\\Models\\User',19),(1,'App\\Models\\User',20),(1,'App\\Models\\User',21),(1,'App\\Models\\User',22),(1,'App\\Models\\User',23),(1,'App\\Models\\User',24),(1,'App\\Models\\User',25),(1,'App\\Models\\User',26),(1,'App\\Models\\User',27),(1,'App\\Models\\User',28);

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

CREATE TABLE `model_has_roles` (
  `role_id` bigint unsigned NOT NULL,
  `model_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint unsigned NOT NULL,
  PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`),
  CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `model_has_roles` VALUES (1,'App\\Models\\User',1),(2,'App\\Models\\User',2),(2,'App\\Models\\User',3),(2,'App\\Models\\User',4),(2,'App\\Models\\User',5),(2,'App\\Models\\User',6),(2,'App\\Models\\User',7),(2,'App\\Models\\User',8),(2,'App\\Models\\User',9),(2,'App\\Models\\User',10),(2,'App\\Models\\User',11),(2,'App\\Models\\User',12),(2,'App\\Models\\User',13),(2,'App\\Models\\User',14),(2,'App\\Models\\User',15),(2,'App\\Models\\User',16),(1,'App\\Models\\User',17),(1,'App\\Models\\User',18),(1,'App\\Models\\User',19),(2,'App\\Models\\User',20),(2,'App\\Models\\User',21),(2,'App\\Models\\User',22),(2,'App\\Models\\User',23),(2,'App\\Models\\User',24),(2,'App\\Models\\User',25),(2,'App\\Models\\User',26),(2,'App\\Models\\User',27),(2,'App\\Models\\User',28);

--
-- Table structure for table `notifications`
--

CREATE TABLE `notifications` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `company_id` int DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` int NOT NULL DEFAULT '0' COMMENT '0=pending, 1=read',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14279 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `notifications`
--

INSERT INTO `notifications` VALUES (14198,16,NULL,'Mikrotik Router Up','✅ Hi Emmanuel, your mikrotik router - Street Mesh is back online.',0,'2025-09-22 22:44:28','2025-09-22 22:44:28'),(14199,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Machinga Complex is offline. Please check it out.',1,'2025-09-23 02:30:24','2025-09-23 14:49:28'),(14200,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Machinga Complex is back online.',1,'2025-09-23 02:34:21','2025-09-23 14:49:28'),(14201,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Machinga Complex is offline. Please check it out.',1,'2025-09-23 04:23:23','2025-09-23 14:49:28'),(14202,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Machinga Complex is back online.',1,'2025-09-23 04:27:21','2025-09-23 14:49:28'),(14203,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Ngoni Net 1 is offline. Please check it out.',1,'2025-09-23 04:55:26','2025-09-23 14:49:28'),(14204,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Ngoni Net 1 is back online.',1,'2025-09-23 05:27:21','2025-09-23 14:49:28'),(14205,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Ngoni Net 1 is offline. Please check it out.',1,'2025-09-23 05:35:26','2025-09-23 14:49:28'),(14206,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Ngoni Net 1 is back online.',1,'2025-09-23 05:54:22','2025-09-23 14:49:28'),(14207,11,NULL,'Invoice Generated','Dear Mwamba Cosmetics, this is a reminder for you to renew your billing system subscription before Sep 28 2025 to avoid any inconveniences. Please pay upfront amount of Ksh 21,000 using below link; https://heritagegroup.co.ke/renew-company-router-subscription/6',0,'2025-09-23 06:00:30','2025-09-23 06:00:30'),(14208,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Machinga Complex is offline. Please check it out.',1,'2025-09-23 07:37:23','2025-09-23 14:49:28'),(14209,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Machinga Complex is offline. Please check it out.',1,'2025-09-23 08:25:24','2025-09-23 14:49:29'),(14210,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Machinga Complex is back online.',1,'2025-09-23 08:29:22','2025-09-23 14:49:29'),(14211,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Machinga Complex is offline. Please check it out.',1,'2025-09-23 09:24:24','2025-09-23 14:49:29'),(14212,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Machinga Complex is back online.',1,'2025-09-23 09:27:21','2025-09-23 14:49:29'),(14213,18,NULL,'Mikrotik Router Down','⚠️ Hi Gilbert mushi, your mikrotik router - G NJARO is offline. Please check it out.',0,'2025-09-23 09:34:29','2025-09-23 09:34:29'),(14214,18,NULL,'Mikrotik Router Up','✅ Hi Gilbert mushi, your mikrotik router - G NJARO is back online.',0,'2025-09-23 09:51:28','2025-09-23 09:51:28'),(14215,16,NULL,'Mikrotik Router Down','⚠️ Hi Emmanuel, your mikrotik router - Street Mesh is offline. Please check it out.',0,'2025-09-23 11:00:34','2025-09-23 11:00:34'),(14216,18,NULL,'Mikrotik Router Down','⚠️ Hi Gilbert mushi, your mikrotik router - G NJARO is offline. Please check it out.',0,'2025-09-23 12:32:32','2025-09-23 12:32:32'),(14217,18,NULL,'Mikrotik Router Up','✅ Hi Gilbert mushi, your mikrotik router - G NJARO is back online.',0,'2025-09-23 12:36:31','2025-09-23 12:36:31'),(14218,18,NULL,'Mikrotik Router Down','⚠️ Hi Gilbert mushi, your mikrotik router - G NJARO is offline. Please check it out.',0,'2025-09-23 12:46:31','2025-09-23 12:46:31'),(14219,18,NULL,'Mikrotik Router Up','✅ Hi Gilbert mushi, your mikrotik router - G NJARO is back online.',0,'2025-09-23 12:50:30','2025-09-23 12:50:30'),(14220,16,NULL,'Mikrotik Router Up','✅ Hi Emmanuel, your mikrotik router - Street Mesh is back online.',0,'2025-09-23 13:01:28','2025-09-23 13:01:28'),(14221,18,NULL,'Mikrotik Router Down','⚠️ Hi Gilbert mushi, your mikrotik router - G NJARO is offline. Please check it out.',0,'2025-09-23 13:05:30','2025-09-23 13:05:30'),(14222,18,NULL,'Mikrotik Router Up','✅ Hi Gilbert mushi, your mikrotik router - G NJARO is back online.',0,'2025-09-23 13:09:33','2025-09-23 13:09:33'),(14223,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Ngoni Net 1 is offline. Please check it out.',1,'2025-09-23 13:12:32','2025-09-23 14:49:29'),(14224,18,NULL,'Mikrotik Router Down','⚠️ Hi Gilbert mushi, your mikrotik router - G NJARO is offline. Please check it out.',0,'2025-09-23 13:12:43','2025-09-23 13:12:43'),(14225,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Ngoni Net 1 is back online.',1,'2025-09-23 13:15:22','2025-09-23 14:49:29'),(14226,18,NULL,'Mikrotik Router Up','✅ Hi Gilbert mushi, your mikrotik router - G NJARO is back online.',0,'2025-09-23 13:16:30','2025-09-23 13:16:30'),(14227,18,NULL,'Mikrotik Router Down','⚠️ Hi Gilbert mushi, your mikrotik router - G NJARO is offline. Please check it out.',0,'2025-09-23 13:28:30','2025-09-23 13:28:30'),(14228,18,NULL,'Mikrotik Router Up','✅ Hi Gilbert mushi, your mikrotik router - G NJARO is back online.',0,'2025-09-23 13:32:29','2025-09-23 13:32:29'),(14229,18,NULL,'Mikrotik Router Down','⚠️ Hi Gilbert mushi, your mikrotik router - G NJARO is offline. Please check it out.',0,'2025-09-23 14:05:31','2025-09-23 14:05:31'),(14230,18,NULL,'Mikrotik Router Up','✅ Hi Gilbert mushi, your mikrotik router - G NJARO is back online.',0,'2025-09-23 14:08:29','2025-09-23 14:08:29'),(14231,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Machinga Complex is offline. Please check it out.',1,'2025-09-23 14:11:23','2025-09-23 14:49:29'),(14232,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Machinga Complex is back online.',1,'2025-09-23 14:16:21','2025-09-23 14:49:29'),(14233,18,NULL,'Mikrotik Router Down','⚠️ Hi Gilbert mushi, your mikrotik router - G NJARO is offline. Please check it out.',0,'2025-09-23 14:22:31','2025-09-23 14:22:31'),(14234,18,NULL,'Mikrotik Router Up','✅ Hi Gilbert mushi, your mikrotik router - G NJARO is back online.',0,'2025-09-23 14:27:29','2025-09-23 14:27:29'),(14235,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Ngoni Net 1 is offline. Please check it out.',1,'2025-09-23 14:58:26','2025-09-23 19:15:35'),(14236,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Ngoni Net 1 is back online.',1,'2025-09-23 15:01:21','2025-09-23 19:15:35'),(14237,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Machinga Complex is offline. Please check it out.',1,'2025-09-23 15:11:23','2025-09-23 19:15:35'),(14238,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Machinga Complex is back online.',1,'2025-09-23 15:15:22','2025-09-23 19:15:35'),(14239,16,NULL,'Mikrotik Router Down','⚠️ Hi Emmanuel, your mikrotik router - Street Mesh is offline. Please check it out.',0,'2025-09-23 16:36:29','2025-09-23 16:36:29'),(14240,16,NULL,'Mikrotik Router Up','✅ Hi Emmanuel, your mikrotik router - Street Mesh is back online.',0,'2025-09-23 16:39:28','2025-09-23 16:39:28'),(14241,16,NULL,'Mikrotik Router Down','⚠️ Hi Emmanuel, your mikrotik router - Street Mesh is offline. Please check it out.',0,'2025-09-23 16:49:30','2025-09-23 16:49:30'),(14242,16,NULL,'Mikrotik Router Up','✅ Hi Emmanuel, your mikrotik router - Street Mesh is back online.',0,'2025-09-23 16:54:28','2025-09-23 16:54:28'),(14243,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Machinga Complex is offline. Please check it out.',1,'2025-09-23 18:55:23','2025-09-23 19:15:35'),(14244,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Machinga Complex is back online.',1,'2025-09-23 18:58:22','2025-09-23 19:15:35'),(14245,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Ngoni Net 1 is offline. Please check it out.',0,'2025-09-23 20:16:26','2025-09-23 20:16:26'),(14246,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Ngoni Net 1 is back online.',0,'2025-09-23 20:20:21','2025-09-23 20:20:21'),(14247,18,NULL,'Mikrotik Router Down','⚠️ Hi Gilbert mushi, your mikrotik router - G NJARO is offline. Please check it out.',0,'2025-09-24 01:19:30','2025-09-24 01:19:30'),(14248,18,NULL,'Mikrotik Router Up','✅ Hi Gilbert mushi, your mikrotik router - G NJARO is back online.',0,'2025-09-24 01:22:28','2025-09-24 01:22:28'),(14249,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Machinga Complex is offline. Please check it out.',0,'2025-09-24 01:37:23','2025-09-24 01:37:23'),(14250,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Machinga Complex is back online.',0,'2025-09-24 01:41:21','2025-09-24 01:41:21'),(14251,16,NULL,'Mikrotik Router Down','⚠️ Hi Emmanuel, your mikrotik router - Street Mesh is offline. Please check it out.',0,'2025-09-24 06:32:30','2025-09-24 06:32:30'),(14252,16,NULL,'Mikrotik Router Up','✅ Hi Emmanuel, your mikrotik router - Street Mesh is back online.',0,'2025-09-24 06:38:28','2025-09-24 06:38:28'),(14253,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Machinga Complex is offline. Please check it out.',0,'2025-09-24 07:08:24','2025-09-24 07:08:24'),(14254,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Machinga Complex is back online.',0,'2025-09-24 07:11:22','2025-09-24 07:11:22'),(14255,16,NULL,'Mikrotik Router Down','⚠️ Hi Emmanuel, your mikrotik router - Street Mesh is offline. Please check it out.',0,'2025-09-24 07:44:30','2025-09-24 07:44:30'),(14256,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Machinga Complex is offline. Please check it out.',0,'2025-09-24 08:08:23','2025-09-24 08:08:23'),(14257,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Machinga Complex is back online.',0,'2025-09-24 09:09:21','2025-09-24 09:09:21'),(14258,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Ngoni Net 1 is offline. Please check it out.',0,'2025-09-24 11:01:26','2025-09-24 11:01:26'),(14259,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Machinga Complex is offline. Please check it out.',0,'2025-09-24 11:04:26','2025-09-24 11:04:26'),(14260,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Ngoni Net 1 is back online.',0,'2025-09-24 11:05:22','2025-09-24 11:05:22'),(14261,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Machinga Complex is back online.',0,'2025-09-24 11:07:21','2025-09-24 11:07:21'),(14262,13,NULL,'Mikrotik Router Up','✅ Hi Kazungu, your mikrotik router - La Zungu is back online.',0,'2025-09-24 12:59:24','2025-09-24 12:59:24'),(14263,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Machinga Complex is offline. Please check it out.',0,'2025-09-24 14:50:23','2025-09-24 14:50:23'),(14264,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Machinga Complex is back online.',0,'2025-09-24 15:51:22','2025-09-24 15:51:22'),(14265,16,NULL,'Mikrotik Router Up','✅ Hi Emmanuel, your mikrotik router - Street Mesh is back online.',0,'2025-09-24 15:57:27','2025-09-24 15:57:27'),(14266,18,NULL,'Mikrotik Router Down','⚠️ Hi Gilbert mushi, your mikrotik router - G NJARO is offline. Please check it out.',0,'2025-09-24 16:05:28','2025-09-24 16:05:28'),(14267,18,NULL,'Mikrotik Router Up','✅ Hi Gilbert mushi, your mikrotik router - G NJARO is back online.',0,'2025-09-24 16:08:27','2025-09-24 16:08:27'),(14268,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Ngoni Net 1 is offline. Please check it out.',0,'2025-09-24 22:07:26','2025-09-24 22:07:26'),(14269,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Machinga Complex is offline. Please check it out.',0,'2025-09-25 00:35:31','2025-09-25 00:35:31'),(14270,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Machinga Complex is back online.',0,'2025-09-25 00:38:28','2025-09-25 00:38:28'),(14271,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Machinga Complex is offline. Please check it out.',0,'2025-09-25 02:32:34','2025-09-25 02:32:34'),(14272,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Machinga Complex is back online.',0,'2025-09-25 03:30:30','2025-09-25 03:30:30'),(14273,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Machinga Complex is offline. Please check it out.',0,'2025-09-25 05:24:35','2025-09-25 05:24:35'),(14274,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Machinga Complex is back online.',0,'2025-09-25 05:28:31','2025-09-25 05:28:31'),(14275,8,NULL,'Mikrotik Router Down','⚠️ Hi Erick, your mikrotik router - Machinga Complex is offline. Please check it out.',0,'2025-09-25 06:27:39','2025-09-25 06:27:39'),(14276,8,NULL,'Mikrotik Router Up','✅ Hi Erick, your mikrotik router - Machinga Complex is back online.',0,'2025-09-25 06:30:36','2025-09-25 06:30:36'),(14277,18,NULL,'Mikrotik Router Down','⚠️ Hi Gilbert mushi, your mikrotik router - G NJARO is offline. Please check it out.',0,'2025-09-25 06:59:42','2025-09-25 06:59:42'),(14278,18,NULL,'Mikrotik Router Up','✅ Hi Gilbert mushi, your mikrotik router - G NJARO is back online.',0,'2025-09-25 07:11:40','2025-09-25 07:11:40');

--
-- Table structure for table `out_messages`
--

CREATE TABLE `out_messages` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `message_mode_id` bigint unsigned NOT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `filename` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `out_messages_message_mode_id_foreign` (`message_mode_id`),
  CONSTRAINT `out_messages_message_mode_id_foreign` FOREIGN KEY (`message_mode_id`) REFERENCES `message_modes` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `out_messages`
--


--
-- Table structure for table `outgoing_transaction_entities`
--

CREATE TABLE `outgoing_transaction_entities` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `outgoing_transaction_id` int NOT NULL,
  `company_grouped_transaction_id` int NOT NULL,
  `amount` decimal(8,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `outgoing_transaction_entities`
--

INSERT INTO `outgoing_transaction_entities` VALUES (1,1,3,210.00,'2025-08-05 19:03:36','2025-08-05 19:03:36',NULL),(2,2,4,210.00,'2025-08-06 20:02:48','2025-08-06 20:02:48',NULL),(3,3,5,1000.00,'2025-08-07 18:53:54','2025-08-07 18:53:54',NULL),(4,4,6,500.00,'2025-08-08 15:56:03','2025-08-08 15:56:03',NULL),(5,5,7,1000.00,'2025-08-09 11:05:18','2025-08-09 11:05:18',NULL),(6,6,8,500.00,'2025-08-09 13:37:14','2025-08-09 13:37:14',NULL),(7,7,9,1000.00,'2025-08-09 15:21:56','2025-08-09 15:21:56',NULL),(8,8,10,1000.00,'2025-08-10 19:09:47','2025-08-10 19:09:47',NULL),(9,9,11,1000.00,'2025-08-11 18:56:22','2025-08-11 18:56:22',NULL),(10,10,12,1000.00,'2025-08-11 19:33:37','2025-08-11 19:33:37',NULL),(11,11,13,210.00,'2025-08-14 20:20:46','2025-08-14 20:20:46',NULL),(12,12,14,1000.00,'2025-08-16 06:35:15','2025-08-16 06:35:15',NULL);

--
-- Table structure for table `outgoing_transactions`
--

CREATE TABLE `outgoing_transactions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `ref_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `company_router_id` int DEFAULT NULL,
  `director_share_id` int DEFAULT NULL,
  `company_customer_invocie_id` int DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `transaction_code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(8,2) NOT NULL DEFAULT '0.00',
  `recipient` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8mb4_unicode_ci,
  `checkout_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `outgoing_transactions`
--

INSERT INTO `outgoing_transactions` VALUES (1,'GA8S5U',2,NULL,NULL,NULL,'0964383972',210.00,'123456','Money sent to 123456 on account number 123456 ','514066','2025-08-05 19:03:36','2025-08-05 19:03:36',NULL),(2,'7YL9KT',2,NULL,NULL,NULL,'0964774233',210.00,'123456','Money sent to 123456 on account number 123456 ','151783','2025-08-06 20:02:48','2025-08-06 20:02:48',NULL),(3,'K9BH8E',2,NULL,NULL,NULL,'1307377571',1000.00,'123456','Money sent to 123456 on account number 123456 ','788624','2025-08-07 18:53:54','2025-08-07 18:53:54',NULL),(4,'8EPQ27',2,NULL,NULL,NULL,'1308639764',500.00,'123456','Money sent to 123456 on account number 123456 ','762516','2025-08-08 15:56:03','2025-08-08 15:56:03',NULL),(5,'OZP260',2,NULL,NULL,NULL,'1309788641',1000.00,'123456','Money sent to 123456 on account number 123456 ','465166','2025-08-09 11:05:18','2025-08-09 11:05:18',NULL),(6,'0ME2JD',2,NULL,NULL,NULL,'1309940132',500.00,'123456','Money sent to 123456 on account number 123456 ','320618','2025-08-09 13:37:14','2025-08-09 13:37:14',NULL),(7,'JU3FQ6',2,NULL,NULL,NULL,'1310045490',1000.00,'123456','Money sent to 123456 on account number 123456 ','184295','2025-08-09 15:21:56','2025-08-09 15:21:56',NULL),(8,'R0PHAV',2,NULL,NULL,NULL,'1311713416',1000.00,'123456','Money sent to 123456 on account number 123456 ','792168','2025-08-10 19:09:47','2025-08-10 19:09:47',NULL),(9,'Y4CP6J',2,NULL,NULL,NULL,'1313139026',1000.00,'123456','Money sent to 123456 on account number 123456 ','431003','2025-08-11 18:56:22','2025-08-11 18:56:22',NULL),(10,'58RHPU',2,NULL,NULL,NULL,'1313175196',1000.00,'123456','Money sent to 123456 on account number 123456 ','021868','2025-08-11 19:33:37','2025-08-11 19:33:37',NULL),(11,'E4FVO2',2,NULL,NULL,NULL,'0967592079',210.00,'123456','Money sent to 123456 on account number 123456 ','118106','2025-08-14 20:20:46','2025-08-14 20:20:46',NULL),(12,'1CKLJO',2,NULL,NULL,NULL,'1319598138',1000.00,'123456','Money sent to 123456 on account number 123456 ','580259','2025-08-16 06:35:15','2025-08-16 06:35:15',NULL);

--
-- Table structure for table `paid_users`
--

CREATE TABLE `paid_users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `company_router_id` bigint unsigned DEFAULT NULL,
  `company_grouped_transaction_id` int DEFAULT NULL,
  `mac_address` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `username` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `message` longtext COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `paid_users_company_router_id_foreign` (`company_router_id`),
  CONSTRAINT `paid_users_company_router_id_foreign` FOREIGN KEY (`company_router_id`) REFERENCES `company_routers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=702 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `paid_users`
--

INSERT INTO `paid_users` VALUES (129,7,140,'DE:FE:99:B9:7F:F5','749353','4130','255785581266','Greetings, thank you for purchasing [plan] plan worthy 200.00. Please use [username] as the username and 4130 as your password to reconnect yourself. Your subscription expires at [expiry_date].','2025-09-01 10:47:58','2025-09-01 10:47:58'),(174,2,185,'FE:02:BF:6C:60:89','702460','7336','255611299495','Greetings, thank you for purchasing [plan] plan worthy 210.00. Please use [username] as the username and 7336 as your password to reconnect yourself. Your subscription expires at [expiry_date].','2025-09-02 23:31:28','2025-09-02 23:31:28');

--
-- Table structure for table `password_reset_tokens`
--

CREATE TABLE `password_reset_tokens` (
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `password_reset_tokens`
--


--
-- Table structure for table `paybill_transactions`
--

CREATE TABLE `paybill_transactions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `ref_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payment_mode_id` bigint unsigned NOT NULL,
  `phone_used` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `transaction_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(8,2) NOT NULL DEFAULT '0.00',
  `checkout_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `paybill_transactions_payment_mode_id_foreign` (`payment_mode_id`),
  CONSTRAINT `paybill_transactions_payment_mode_id_foreign` FOREIGN KEY (`payment_mode_id`) REFERENCES `payment_modes` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `paybill_transactions`
--


--
-- Table structure for table `payment_methods`
--

CREATE TABLE `payment_methods` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `ref_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` int NOT NULL DEFAULT '1' COMMENT '0=inactive, 1=active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `payment_methods`
--

INSERT INTO `payment_methods` VALUES (1,'0001','Selcom',1,'2025-08-03 19:10:06','2025-08-03 19:10:06',NULL);

--
-- Table structure for table `payment_modes`
--

CREATE TABLE `payment_modes` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `ref_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` int NOT NULL DEFAULT '1' COMMENT '0=inactive, 1=active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `payment_modes`
--

INSERT INTO `payment_modes` VALUES (1,'0001','M-PESA',1,'2025-08-03 19:10:05','2025-08-03 19:10:05',NULL),(2,'0002','M-PESA (Manually)',1,'2025-08-03 19:10:05','2025-08-03 19:10:05',NULL),(3,'0003','Cash',1,'2025-08-03 19:10:05','2025-08-03 19:10:05',NULL);

--
-- Table structure for table `payment_types`
--

CREATE TABLE `payment_types` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `payment_types`
--

INSERT INTO `payment_types` VALUES (1,'Fixed Amount','2025-08-03 19:10:01','2025-08-03 19:10:01',NULL),(2,'Commission Based','2025-08-03 19:10:01','2025-08-03 19:10:01',NULL);

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

CREATE TABLE `permissions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `group` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `guard_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `permissions_name_guard_name_unique` (`name`,`guard_name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `permissions` VALUES (1,'Administer Company',NULL,'web','2025-08-03 19:10:01','2025-08-03 19:10:01'),(2,'Staff',NULL,'web','2025-08-03 19:10:01','2025-08-03 19:10:01');

--
-- Table structure for table `personal_access_tokens`
--

CREATE TABLE `personal_access_tokens` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `tokenable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tokenable_id` bigint unsigned NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `abilities` text COLLATE utf8mb4_unicode_ci,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `expires_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `personal_access_tokens`
--


--
-- Table structure for table `plan_validity_types`
--

CREATE TABLE `plan_validity_types` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `ref_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `entity` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `plan_validity_types`
--

INSERT INTO `plan_validity_types` VALUES (1,'0001','Minutes','m','2025-08-03 19:10:02','2025-08-03 19:10:02',NULL),(2,'0002','Hours','h','2025-08-03 19:10:02','2025-08-03 19:10:02',NULL),(3,'0003','Days','d','2025-08-03 19:10:02','2025-08-03 19:10:02',NULL);

--
-- Table structure for table `potential_customers`
--

CREATE TABLE `potential_customers` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `company_id` int DEFAULT NULL,
  `names` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `potential_customers`
--


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

CREATE TABLE `role_has_permissions` (
  `permission_id` bigint unsigned NOT NULL,
  `role_id` bigint unsigned NOT NULL,
  PRIMARY KEY (`permission_id`,`role_id`),
  KEY `role_has_permissions_role_id_foreign` (`role_id`),
  CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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


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

CREATE TABLE `roles` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `roles_name_guard_name_unique` (`name`,`guard_name`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `roles` VALUES (1,'Administrator','web','2025-08-03 19:10:01','2025-08-03 19:10:01'),(2,'Client','web','2025-08-03 19:10:01','2025-08-03 19:10:01'),(3,'Referrer','web','2025-08-03 19:10:01','2025-08-03 19:10:01');

--
-- Table structure for table `service_plans`
--

CREATE TABLE `service_plans` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `ref_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` int NOT NULL DEFAULT '1' COMMENT '0=inactive, 1=active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `service_plans`
--

INSERT INTO `service_plans` VALUES (1,'0001','Hotspot Plans',1,'2025-08-03 19:10:02','2025-08-03 19:10:02',NULL),(2,'0002','PPPoE Plans',1,'2025-08-03 19:10:02','2025-08-03 19:10:02',NULL),(3,'0003','Static Plans',1,'2025-08-03 19:10:02','2025-08-03 19:10:02',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint unsigned DEFAULT NULL,
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8mb4_unicode_ci,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_activity` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sessions_user_id_index` (`user_id`),
  KEY `sessions_last_activity_index` (`last_activity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` VALUES ('1X7s799sCDcmyIMbBJAEInvZJXlsKKu6VxXs5EQW',NULL,'102.208.180.254','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36','YTozOntzOjY6Il90b2tlbiI7czo0MDoiamxHZ2VSa2lJM2EwNFJqelRQT2hYWVMza1hFajRqWFdKanh0dVVwdyI7czozOiJ1cmwiO2E6MTp7czo4OiJpbnRlbmRlZCI7czozMjoiaHR0cHM6Ly9oZXJpdGFnZWdyb3VwLmNvLmtlL2hvbWUiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19',1758781352),('5LTfbSQ5Wbz7rUWp5dNvN5QsCpqxs6DrPV7GCihx',NULL,'43.152.72.244','Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1','YTozOntzOjY6Il90b2tlbiI7czo0MDoiN2w2OGpDVTg2YW1FUDhTV1V5ekpnUFRFY3FTYmZIZUJEUTFhdG5YTCI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mjc6Imh0dHA6Ly8xNjEuOTcuMTc0LjIwL3B1YmxpYyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=',1758734239),('5wkMvxKjC1yYFDvwxP2YpVzluIYNjSHkbwhVGzna',NULL,'167.94.138.188','Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)','YTozOntzOjY6Il90b2tlbiI7czo0MDoiNlp0dmdHS2VoODNzNnI4SjFSQ3hmTm0zUUlFRFlJNmdrUE1jaFVUZyI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mjc6Imh0dHA6Ly8xNjEuOTcuMTc0LjIwL3B1YmxpYyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=',1758775642),('6Ijhvx6cfMXBfUWjsC4bZyJf9bJ8pECPO2QAaTAm',15,'41.59.21.130','Mozilla/5.0 (Linux; U; Android 13; en-us; Infinix X6528 Build/TP1A.220624.014) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.6367.123 Mobile Safari/537.36 PHX/19.4','[encoded data, 250540 characters]',1758733281),('7SMpoysgTQT6T6nI1vWUuP8tmbvpeoLdHGngg71q',NULL,'196.96.175.144','WhatsApp/2.23.20.0','YTozOntzOjY6Il90b2tlbiI7czo0MDoidWhTYkdZMDhaemNXTWxWWGMzQThhZzh3OWV5cEg2QXFQaVVKSXpHSSI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mjc6Imh0dHBzOi8vaGVyaXRhZ2Vncm91cC5jby5rZSI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=',1758732636),('c7hC1DNwPiNsf6pZvNnbKNhRz7ddvRtE9HqvFzSh',NULL,'119.96.24.54','Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1','YTozOntzOjY6Il90b2tlbiI7czo0MDoiQW45cmVxQ2dSSld1RXE1RkxPTGdYWll1T2RndzgyTWU5R0JyeTNNaSI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzA6Imh0dHA6Ly93d3cuaGVyaXRhZ2Vncm91cC5jby5rZSI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=',1758784180),('E3WXho6Lf1DXrTCFN06VuXGokfjKD0tdHxtyzHad',NULL,'41.59.21.130','Mozilla/5.0 (Linux; Android 13; TECNO KI7 Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/140.0.7339.51 Mobile Safari/537.36','YTozOntzOjY6Il90b2tlbiI7czo0MDoiVDMzMUlrU2cxbXp0Y0d1aEVDMG1BMjFqU2lZNUdSbm8xdDNpWEhDayI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mjc6Imh0dHBzOi8vaGVyaXRhZ2Vncm91cC5jby5rZSI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=',1758736770),('EwBSthEFnltjWb96Ys2P0TpeQ4WSfS8pCm3kaiu6',NULL,'44.205.29.107','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36','YTozOntzOjY6Il90b2tlbiI7czo0MDoiTDlNOHQzbVRxWVhuQmF1ZUtpbEFjckt5NUswbGtpcnVNQjdnT2JoYSI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mjc6Imh0dHBzOi8vaGVyaXRhZ2Vncm91cC5jby5rZSI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=',1758776699),('F9sVbJ7HbxnWZo9PG1VdiKhwxlUdfRYm6A23nLer',NULL,'110.40.186.63','Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1','YTozOntzOjY6Il90b2tlbiI7czo0MDoibW9PQm1WTWxpRExCN25vOVB0RzZ3a1F5VzJKdUZZUEhyZ3FpR1F4MCI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MjY6Imh0dHA6Ly9oZXJpdGFnZWdyb3VwLmNvLmtlIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==',1758770182),('fMutySPnWttGXYOUydv2nt9V9SwvRjzR6N9wwQ7C',NULL,'51.68.111.209','Mozilla/5.0 (compatible; MJ12bot/v2.0.4; http://mj12bot.com/)','YTozOntzOjY6Il90b2tlbiI7czo0MDoickxURTlYcm5NSXJKNmNkN05jOFRUTXd0QUhiV3VTUnByTld5dVZKdiI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mjc6Imh0dHBzOi8vaGVyaXRhZ2Vncm91cC5jby5rZSI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=',1758729154),('GV23PpY7FPdNIJvuPpsGGLDK5Mv8zeJ097Gcz2I5',NULL,'66.249.78.41','Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.127 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)','YTozOntzOjY6Il90b2tlbiI7czo0MDoiaER1T0hKZ2pFMmRxajh6UmxLYWtYMWQyVEZicDNMRnhTODVlRFgzbCI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mzg6Imh0dHBzOi8vaGVyaXRhZ2Vncm91cC5jby5rZS9jb250YWN0LXVzIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==',1758748070),('GXZZeHfr4h7zSHgZeqHLI6cRV0RI7tFnmnFieK0U',NULL,'66.249.75.160','Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.127 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)','YTozOntzOjY6Il90b2tlbiI7czo0MDoiVlNIbTFFNzdVZ29rdHk5ZGNyZWxXV29JU1duSTdsSE1DZVY3VVZ3QSI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzA6Imh0dHA6Ly93d3cuaGVyaXRhZ2Vncm91cC5jby5rZSI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=',1758758870),('hpAnyjToMl4oRRp91EwkBj8mwwku37TGfIyIbOyi',NULL,'196.96.175.144','WhatsApp/2.23.20.0','YTozOntzOjY6Il90b2tlbiI7czo0MDoicTFvYlhpdlJ5aWpJM2wwV2FKcFFqNk1haXVLUFljendNT2JYSzRmViI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mjc6Imh0dHBzOi8vaGVyaXRhZ2Vncm91cC5jby5rZSI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=',1758732636),('ILfZEyzWgIiIctMkjU4owpARUTrL5fGn11kzxGFS',15,'41.59.21.130','Mozilla/5.0 (Linux; U; Android 13; en-us; Infinix X6528 Build/TP1A.220624.014) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.6367.123 Mobile Safari/537.36 PHX/19.4','[encoded data, 185683 characters]