
--
-- Table structure for table `tickets`
--

CREATE TABLE `tickets` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `ref_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `company_id` bigint unsigned NOT NULL,
  `company_router_id` bigint unsigned NOT NULL,
  `user_id` bigint unsigned NOT NULL,
  `issue_title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `reminder` datetime NOT NULL,
  `stage` enum('Open','In Progress','Resolved','Closed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Open',
  `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 `tickets_company_id_foreign` (`company_id`),
  KEY `tickets_company_router_id_foreign` (`company_router_id`),
  KEY `tickets_user_id_foreign` (`user_id`),
  CONSTRAINT `tickets_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE,
  CONSTRAINT `tickets_company_router_id_foreign` FOREIGN KEY (`company_router_id`) REFERENCES `company_routers` (`id`) ON DELETE CASCADE,
  CONSTRAINT `tickets_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tickets`
--


--
-- Table structure for table `transaction_frequencies`
--

CREATE TABLE `transaction_frequencies` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `number_of_days` int 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=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `transaction_frequencies`
--

INSERT INTO `transaction_frequencies` VALUES (1,'Instantly',0,'2025-08-03 19:10:02','2025-08-03 19:10:02',NULL),(2,'Daily',1,'2025-08-03 19:10:02','2025-08-03 19:10:02',NULL),(3,'Three Days',3,'2025-08-03 19:10:02','2025-08-03 19:10:02',NULL),(4,'Weekly',7,'2025-08-03 19:10:02','2025-08-03 19:10:02',NULL),(5,'Monthly',30,'2025-08-03 19:10:02','2025-08-03 19:10:02',NULL);

--
-- Table structure for table `user_verification_codes`
--

CREATE TABLE `user_verification_codes` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned DEFAULT NULL,
  `phone_code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_code` 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 `user_verification_codes_user_id_foreign` (`user_id`),
  CONSTRAINT `user_verification_codes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `user_verification_codes`
--


--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `ref_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `username` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `referrer_phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `phone_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` int NOT NULL DEFAULT '1' COMMENT '0=inactive, 1=active',
  `remember_token` varchar(100) 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`),
  UNIQUE KEY `users_phone_unique` (`phone`),
  UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1,'HF4Y6D','Super Admin','0712345678',NULL,'superadmin@gmail.com','2025-07-30 21:26:20','2025-07-30 21:26:20','$2y$12$sL9rLDiCAscrNQ.NY2RztOzzU0.cSCW6B5rNjnvO4i8ICYnXXnIbG',1,NULL,'2025-07-30 21:26:20','2025-08-13 09:20:47',NULL),(14,'H0ERF2','Ben','0745678',NULL,NULL,'2025-08-05 15:16:00','2025-08-05 15:16:00','$2y$12$mgPvt.LZISWEj4nKuYXv6urRN3LvIt1dML13T/snulGiRoOuGWkUq',1,NULL,'2025-08-05 15:16:00','2025-08-05 15:16:00',NULL),(15,'9E8FYP','Erick','0763752350',NULL,'sirnjovu86@gmail.com','2025-08-05 16:56:56','2025-08-05 16:56:56','$2y$12$t28h8a0Wo1XrJk0XZHrmS.zJKIvU002din28wiRKlPKVeRdv.Z10e',1,NULL,'2025-08-05 16:56:56','2025-08-09 11:59:27',NULL),(16,'5NGAQV','Admin','0712345679',NULL,NULL,'2025-08-12 12:25:52','2025-08-12 12:25:52','$2y$12$kuyPB0V6yohwp/aAz4epeO5VQrnpwnW7jJk9KLPTpKxBIfis8CiR2',1,NULL,'2025-08-12 12:25:52','2025-08-12 12:25:52',NULL),(17,'SGC5QD','Te','0694214936',NULL,'test@hmail.com','2025-08-13 07:21:07','2025-08-13 07:21:07','$2y$12$oIxyMmt3CSWOD/v2CEIzH..mKvXm0N61/x7IIMZ0x9Godd0pkXMYK',0,NULL,'2025-08-13 07:21:07','2025-08-13 20:48:18',NULL),(18,'W19D5P','Test','0693058471',NULL,'test@gmail.com','2025-08-13 07:21:55','2025-08-13 07:21:55','$2y$12$LE8vKzwYDwZHpw.hRN7oyuY4XhagL0O4oPpffvuNDZC70Vmt3lkkC',0,NULL,'2025-08-13 07:21:55','2025-08-13 20:48:00',NULL),(19,'2SZ35Y','Admin','07871099880',NULL,NULL,'2025-08-13 19:46:16','2025-08-13 19:46:16','$2y$12$tyfHnsegYuJzDVVrUGjj.eseTN4v2R2TCUmHZ/B09O6XeMd8Vc3bO',0,NULL,'2025-08-13 19:46:16','2025-08-13 20:47:46','2025-08-13 20:47:46'),(20,'Q3B8YT','Mwamba Cosmetics','0786000803',NULL,'export@fotini.com','2025-08-26 13:06:13','2025-08-26 13:06:13','$2y$12$h0Nfh6j2Mx0foH/6aLc6jOQE2C8Bzurd2Mf3XN5/miuSlz/HpYvNm',1,NULL,'2025-08-26 13:06:13','2025-09-01 11:07:14',NULL),(22,'UTR7BK','Kazungu','0754578434',NULL,'karnsonkazy@gmail.com','2025-08-29 19:10:58','2025-08-29 19:10:58','$2y$12$lzHpyUqns/kIE35ylRwzX.FFrmfGM9WYMOLdYnwbod8jzYYJmCjDS',1,NULL,'2025-08-29 19:10:58','2025-08-31 10:13:34',NULL),(23,'89B4PI','Alex','0696849400',NULL,NULL,'2025-08-30 06:58:45','2025-08-30 06:58:45','$2y$12$MI56zu0nxXUNc7ruSGvtcOPsls1OcGmkDBBylFHmKEGS80o5zjJHG',1,NULL,'2025-08-30 06:58:45','2025-08-30 06:58:45',NULL),(24,'VF1AK0','jack','0714504348',NULL,NULL,'2025-08-31 22:17:44','2025-08-31 22:17:44','$2y$12$.t49VYTvG2.HsbEoS1Wxiuva1ap.Tg3SRLWa7ebHdc8UR44Moy.5K',1,NULL,'2025-08-31 22:17:44','2025-08-31 22:17:44',NULL),(25,'V4PJR7','Emmanuel','0747777710',NULL,'maluliemmanuel.me@gmail.com','2025-09-06 06:09:37','2025-09-06 06:09:37','$2y$12$wUBGv2AUQ1C6K3EgJDXX1u6FUa0rRZ7AYYazUM/fRsXgELWwv0mvy',1,NULL,'2025-09-06 06:09:37','2025-09-06 13:02:38',NULL),(26,'5DLG6S','maluli','0714797942',NULL,'dextercryptog@gmail.com','2025-09-06 13:01:40','2025-09-06 13:01:40','$2y$12$rZ58zpkXV5p8qA5hjPZj7.lmsLYFdMWtCYAv1e59gJY81qRQgaKd6',1,NULL,'2025-09-06 13:01:40','2025-09-06 13:02:24',NULL),(27,'GM7EX8','Emmanuel Mgedela','0780601042',NULL,'mgendelaemmanuel20@gmail.com','2025-09-09 09:33:08','2025-09-09 09:33:08','$2y$12$FFlCGbXE3Pe2mdFXSefpe.icJSFLyU1W8dhnIEInrb0.HiOnm9VkG',1,NULL,'2025-09-09 09:33:08','2025-09-09 11:01:08',NULL),(28,'7ZGQLA','Gilbert mushi','0769932392',NULL,'gilbertmoshi@gmail.com','2025-09-18 14:24:23','2025-09-18 14:24:23','$2y$12$4dukvvrPhYO4XShHNIBxt.e8koOL4roF2O/aVaJkHJU4Tw9/l1Jhm',1,NULL,'2025-09-18 14:24:23','2025-09-18 14:47:01',NULL),(29,'EA7IQ2','Emmanuel Mwazembe','07577006671',NULL,NULL,'2025-09-25 11:55:26','2025-09-25 11:55:26','$2y$12$GKAwdHDhxcQPSf80Iyj/H.z9s5gWA4At0O0J5HBuHjSb9jxwKPmQy',0,NULL,'2025-09-25 11:55:26','2025-10-03 06:43:13',NULL),(30,'PM1OJL','FiberNet HotSpot','0788443614',NULL,'fibernetmk@outlook.com','2025-09-26 08:35:02','2025-09-26 08:35:02','$2y$12$btXFhV.d4XvXwEoYokRK0OkoTKXnR7rBCIUSVGnblfY9OiMNk7DEK',1,NULL,'2025-09-26 08:35:02','2025-09-30 17:47:12',NULL),(31,'D1CE70','Ernest Cheyo','0765288577',NULL,NULL,'2025-09-28 14:43:39','2025-09-28 14:43:39','$2y$12$W9hjrIwk6SDBGAyaXsqfB.hT9oeC8k7RFRolmP/GaJF6EiIyofzkS',1,NULL,'2025-09-28 14:43:39','2025-10-03 21:34:02',NULL),(32,'YM6OTQ','Manyala Agalla','0679254949',NULL,NULL,'2025-09-29 10:07:30','2025-09-29 10:07:30','$2y$12$kZsFOis9XAw6sNd7DIssA.y68TOgbiCSDTs1sK1bOQNjmNMyfZ0DW',1,NULL,'2025-09-29 10:07:30','2025-09-29 12:10:52',NULL),(33,'CUK5QA','DENIS AMINI','0759499967',NULL,'sales@iteam.co.tz','2025-09-29 16:41:08','2025-09-29 16:41:08','$2y$12$Gpl51oPSfgrC5KuwLpyfq.A5kv33x1KJf9evrDqEQnz57Xnp30MMO',1,NULL,'2025-09-29 16:41:08','2025-10-01 04:34:27',NULL),(34,'LZ7BWJ','islam','0789431231',NULL,NULL,'2025-09-29 17:59:20','2025-09-29 17:59:20','$2y$12$qN2PumcXnMV/6.mq1MHu4O0/cEr4GU64tKbWSdjSw3ZrpX0ntBfJ6',1,NULL,'2025-09-29 17:59:20','2025-10-01 04:36:03',NULL),(35,'EQD91I','Innocent Mtui','0759920774',NULL,NULL,'2025-09-30 08:49:41','2025-09-30 08:49:41','$2y$12$yr7ctBZAduKZUMLFlrn0oe5gNaR02HGTUQ0jJFpaa4ph/wswOHyTy',1,NULL,'2025-09-30 08:49:41','2025-09-30 08:49:41',NULL),(36,'4M1KP6','Songa Musa','0783502405',NULL,'Vsongwyne@gmail.com','2025-09-30 09:13:04','2025-09-30 09:13:04','$2y$12$4Z2JpzfuATtB/ED4NAgtpexA8s1njdk/QBCD9WTufAvS44BohBFCS',1,NULL,'2025-09-30 09:13:04','2025-09-30 09:34:27',NULL),(37,'BPJLK0','Ivan Rauya','0688680386',NULL,'ivonirauya@gmail.com','2025-10-01 16:23:50','2025-10-01 16:23:50','$2y$12$XxI4UucIWsdb3B5Gg5Ptw.E/5tZDBMinVTmD9FBhqr70ANXK89zHa',1,NULL,'2025-10-01 16:23:50','2025-10-01 17:00:55',NULL),(38,'Z3WR8X','Garcia','0199985858',NULL,'info@twistechs.bj','2025-10-03 09:04:22','2025-10-03 09:04:22','$2y$12$8C2ZGJOFzYF6wueMBaq3B.355HtxRziUf2uYPtwujGPKz8pj3kwI6',1,NULL,'2025-10-03 09:04:22','2025-10-04 13:57:53',NULL),(39,'DH3V98','Kelvin Yolam','0744002165',NULL,'kelvinyoram57@gmail.com','2025-10-04 13:01:27','2025-10-04 13:01:27','$2y$12$E3BCKRWmY0uWdLiI8vNHnuoTUGYW/5QT2HC0Z5ZGw2azJ2Ox01Aba',1,NULL,'2025-10-04 13:01:27','2025-10-04 13:39:00',NULL),(40,'HV493U','Trekker','256787176354',NULL,'muhindosamuel0@gmail.com','2025-10-04 15:30:12','2025-10-04 15:30:12','$2y$12$eOXV5e/P4BB10EUr3sIjj.EbceUPwq7l7gFVWPZCOfASHNEnXtGbi',1,NULL,'2025-10-04 15:30:12','2025-10-04 16:21:21',NULL),(42,'94YGEH','Zurich','0787109988',NULL,'zurichgames2022@gmail.com','2025-10-07 18:10:55','2025-10-07 18:10:55','$2y$12$3QMUGgexC6BS7BaJkWFuZ.CV8lMV6L.yekB2v4fL8myqdRf.A0bga',1,NULL,'2025-10-07 18:10:55','2025-10-08 07:42:41',NULL),(43,'AXM82S','Juma Omar','07778198889',NULL,'finyotech@gmail.com','2025-10-08 07:47:36','2025-10-08 07:47:36','$2y$12$FM7q51.u2.sduz1LCUgxhuN/Ao5iCNOs/EwYRZdvkLBu3HYMC4TVy',1,NULL,'2025-10-08 07:47:36','2025-10-08 08:44:38',NULL),(44,'F4E2CT','Moses Mousa','0778180076',NULL,'olamoses47@yahoo.com','2025-10-11 11:22:25','2025-10-11 11:22:25','$2y$12$xoTi/eRcOoEF06vmbWoQI.HEadYVFhoXlp3QSfS0WaEXjByIALadS',1,NULL,'2025-10-11 11:22:25','2025-10-11 17:02:30',NULL),(45,'R6Z295','Trial','0712345',NULL,NULL,'2025-10-11 14:29:16','2025-10-11 14:29:16','$2y$12$V2lQrq55q5nuQeWLvTfMw.J.AMUOILZ0.zI3tUb.N1k5C/szCD5YW',1,NULL,'2025-10-11 14:29:16','2025-10-11 14:29:16',NULL),(46,'793NEZ','Jacob Irungu','0696011778',NULL,'jacobmuturiirungu@gmail.com','2025-10-16 06:14:37','2025-10-16 06:14:37','$2y$12$UG/tAggWlFVxH5b/AosKFegolRWyXYBKi1YysvlISrPoV5CirPAle',1,NULL,'2025-10-16 06:14:37','2025-10-16 06:14:37',NULL),(47,'7NHAD4','Fredy Necks','0764334732',NULL,'mwamwalafredy@gmail.com','2025-10-23 19:40:10','2025-10-23 19:40:10','$2y$12$yiG09EoSkdkhGebSEKyqsOE6k6ylQENHlqJuibT2DCHb7IxRRzI8.',1,NULL,'2025-10-23 19:40:10','2025-10-23 20:00:15',NULL),(48,'A7R4LG','Erick Njomvu','0716582313',NULL,NULL,'2025-10-26 15:06:22','2025-10-26 15:06:22','$2y$12$7nZzfjTGIbT73r0rmL7Wkuwv14jTCWyGPwKVwyc4EBMpP5vRUTex2',1,NULL,'2025-10-26 15:06:22','2025-10-26 15:06:22',NULL),(49,'36E4JA','Carlos Kenyatta','0760489180',NULL,'novawifi001@gmail.com','2025-10-27 16:45:13','2025-10-27 16:45:13','$2y$12$GPxzg/5xTBhKsQW.eaUiqOFtm60zeYwtTSchpzXRTo1wP2ktDQ3pe',1,NULL,'2025-10-27 16:45:13','2025-10-27 18:43:17',NULL),(59,'EJD3TC','TRIAL','08754',NULL,'trial@gmail.com','2025-10-29 07:38:55','2025-10-29 07:38:55','$2y$12$ldJRV.YXKvHZDxdA7JAV1.8Sshl9SEi5jyNEEpGTnMCSQToQmP5u.',1,NULL,'2025-10-29 07:38:55','2025-10-29 07:38:55',NULL),(60,'CXJ7YQ','mimi mimi','0655054056',NULL,NULL,'2025-10-29 07:51:37','2025-10-29 07:51:37','$2y$12$p21JKba94zkwuNuVXZJFU..7u.wWiyCkmcQJQGa/hc8LM1fDXO0wu',1,NULL,'2025-10-29 07:51:37','2025-10-29 07:57:03',NULL);


