--
-- Table structure for table `admin_audit_logs`
--

CREATE TABLE `admin_audit_logs` (
  `id` bigint UNSIGNED NOT NULL,
  `admin_id` int UNSIGNED NOT NULL,
  `action` varchar(100) COLLATE utf8mb4_general_ci NOT NULL,
  `resource` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `resource_id` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `before_data` json DEFAULT NULL,
  `after_data` json DEFAULT NULL,
  `ip_address` varchar(45) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8mb4_general_ci,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `admin_audit_logs`
--

INSERT INTO `admin_audit_logs` (`id`, `admin_id`, `action`, `resource`, `resource_id`, `before_data`, `after_data`, `ip_address`, `user_agent`, `created_at`, `updated_at`) VALUES
(1, 143, 'admin.login', NULL, NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-02-24 23:27:32', '2026-02-24 23:27:32'),
(2, 143, 'admin.login', NULL, NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-02-25 15:31:27', '2026-02-25 15:31:27'),
(3, 143, 'admin.login', NULL, NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-02-28 23:53:23', '2026-02-28 23:53:23'),
(4, 143, 'admin.logout', NULL, NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-01 00:22:40', '2026-03-01 00:22:40'),
(5, 143, 'admin.login', NULL, NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-01 00:23:07', '2026-03-01 00:23:07'),
(6, 143, 'admin.logout', NULL, NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-01 00:24:39', '2026-03-01 00:24:39'),
(7, 143, 'admin.login', NULL, NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-01 00:24:52', '2026-03-01 00:24:52'),
(8, 143, 'admin.login', NULL, NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-01 15:12:50', '2026-03-01 15:12:50'),
(9, 143, 'admin.login', NULL, NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-02 01:35:44', '2026-03-02 01:35:44'),
(10, 143, 'kyc.approved', 'KYC approved', '30', '{\"tier\": 1}', NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-02 03:37:43', '2026-03-02 03:37:43'),
(11, 143, 'kyc.approved', 'KYC approved', '30', '{\"tier\": 2}', NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-02 03:46:38', '2026-03-02 03:46:38'),
(12, 143, 'admin.login', NULL, NULL, 'null', NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-03 10:32:25', '2026-03-03 10:32:25'),
(13, 143, 'admin.login', NULL, NULL, 'null', NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-10 20:59:30', '2026-03-10 20:59:30'),
(14, 143, 'admin.login', NULL, NULL, 'null', NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-11 10:11:30', '2026-03-11 10:11:30'),
(15, 143, 'admin.updated', 'Admin updated', '1', 'null', NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-11 10:34:27', '2026-03-11 10:34:27'),
(16, 143, 'admin.login', NULL, NULL, 'null', NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-11 13:15:36', '2026-03-11 13:15:36'),
(17, 143, 'admin.created', 'New admin created: ohunayogege+400@gmail.com', '144', 'null', NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-11 13:40:07', '2026-03-11 13:40:07'),
(18, 143, 'profile.updated', 'Profile updated successfully', '143', 'null', NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-11 14:03:45', '2026-03-11 14:03:45'),
(19, 143, 'profile.updated', 'Profile updated successfully', '143', 'null', NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-11 14:03:57', '2026-03-11 14:03:57'),
(20, 143, 'admin.login', NULL, NULL, 'null', NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-16 08:30:12', '2026-03-16 08:30:12'),
(21, 143, 'admin.login', NULL, NULL, 'null', NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-16 22:35:19', '2026-03-16 22:35:19'),
(22, 143, 'admin.login', NULL, NULL, 'null', NULL, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-17 12:40:59', '2026-03-17 12:40:59');

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

--
-- Table structure for table `admin_notes`
--

CREATE TABLE `admin_notes` (
  `id` bigint UNSIGNED NOT NULL,
  `entity_type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'kyc, transaction, dispute, fraud, bill, user',
  `entity_id` bigint UNSIGNED NOT NULL,
  `note` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `admin_id` bigint UNSIGNED NOT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `admin_profiles`
--

CREATE TABLE `admin_profiles` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED NOT NULL,
  `first_name` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `last_name` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `role_label` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'Human-readable admin role',
  `is_super_admin` tinyint(1) DEFAULT '0',
  `force_password_reset` tinyint(1) DEFAULT '0',
  `force_2fa` tinyint(1) DEFAULT '1',
  `last_login_at` datetime DEFAULT NULL,
  `last_login_ip` varchar(45) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_by` bigint UNSIGNED DEFAULT NULL COMMENT 'Super admin ID',
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `admin_profiles`
--

INSERT INTO `admin_profiles` (`id`, `user_id`, `first_name`, `last_name`, `role_label`, `is_super_admin`, `force_password_reset`, `force_2fa`, `last_login_at`, `last_login_ip`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 143, 'Senior', 'Guy', 'Super Administrator', 1, 0, 0, '2026-03-17 12:40:59', '::1', NULL, '2026-02-24 23:18:45', '2026-03-17 12:40:59');

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

--
-- Table structure for table `admin_sessions`
--

CREATE TABLE `admin_sessions` (
  `id` bigint UNSIGNED NOT NULL,
  `admin_id` int UNSIGNED NOT NULL,
  `session_id` varchar(128) COLLATE utf8mb4_general_ci NOT NULL,
  `ip_address` varchar(45) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8mb4_general_ci,
  `last_activity` datetime NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `auth_groups_users`
--

CREATE TABLE `auth_groups_users` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED NOT NULL,
  `group` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `auth_groups_users`
--

INSERT INTO `auth_groups_users` (`id`, `user_id`, `group`, `created_at`) VALUES
(4, 143, 'super_admin', '0000-00-00 00:00:00');

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

--
-- Table structure for table `auth_identities`
--

CREATE TABLE `auth_identities` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED NOT NULL,
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `secret` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `secret2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `expires` datetime DEFAULT NULL,
  `extra` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `force_reset` tinyint(1) NOT NULL DEFAULT '0',
  `last_used_at` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `auth_identities`
--

INSERT INTO `auth_identities` (`id`, `user_id`, `type`, `name`, `secret`, `secret2`, `expires`, `extra`, `force_reset`, `last_used_at`, `created_at`, `updated_at`) VALUES
(77, 72, 'email_password', NULL, 'ilajedev@gmail.com', '$2y$12$fH59tQL/4SUIoihFiaF.t.6tkfAfCOQ0pT6/v5Srha7boUtnVu6Tm', NULL, NULL, 0, NULL, '2025-12-20 10:14:05', '2026-01-23 15:55:01'),
(162, 127, 'email_password', NULL, 'ohunayogege@gmail.com', '$2y$12$KpPh7SWKYPvWFxCx9lkeJ.sGqJFh.ohVd8MYw5ZEtPipfP1yPMmra', NULL, NULL, 0, NULL, '2026-01-26 12:40:25', '2026-01-26 12:40:26'),
(185, 127, 'access_token', 'mobile-api-token', 'f7c91eb1a446e42609cf480c1cd6c48339e3f41c36e85a3515c72e82aac3c6d3', NULL, NULL, 'a:1:{i:0;s:1:\"*\";}', 0, '2026-02-23 15:54:43', '2026-02-23 14:59:29', '2026-02-23 15:54:43'),
(188, 143, 'email_password', NULL, 'admin@aknapay.com', '$2y$12$8h2E5LvQTeR3f6T5Dw2/oup6a2V88VuU1r503etUKG1FIHyxP/.gi', NULL, NULL, 0, '2026-03-17 12:40:59', '2026-02-24 23:18:45', '2026-03-17 12:40:59');

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

--
-- Table structure for table `auth_logins`
--

CREATE TABLE `auth_logins` (
  `id` int UNSIGNED NOT NULL,
  `ip_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `user_agent` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `id_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `identifier` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `date` datetime NOT NULL,
  `success` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `auth_logins`
--

INSERT INTO `auth_logins` (`id`, `ip_address`, `user_agent`, `id_type`, `identifier`, `user_id`, `date`, `success`) VALUES
(2, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@upfast.com', NULL, '2026-02-24 18:33:14', 0),
(3, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@upfast.com', NULL, '2026-02-24 18:33:29', 0),
(4, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@upfast.com', NULL, '2026-02-24 18:33:35', 0),
(5, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@upfast.com', NULL, '2026-02-24 18:34:34', 0),
(6, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@linkcreator.ai', NULL, '2026-02-24 22:56:47', 0),
(7, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@linkcreator.ai', NULL, '2026-02-24 22:57:38', 0),
(8, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@linkcreator.ai', NULL, '2026-02-24 22:58:29', 0),
(9, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@linkcreator.ai', NULL, '2026-02-24 22:59:33', 0),
(10, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@linkcreator.ai', NULL, '2026-02-24 23:01:58', 0),
(11, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@linkcreator.ai', NULL, '2026-02-24 23:05:17', 0),
(12, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@aknapay.com', 143, '2026-02-24 23:20:24', 1),
(13, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@aknapay.com', 143, '2026-02-24 23:25:08', 1),
(14, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@aknapay.com', 143, '2026-02-24 23:26:31', 1),
(15, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@aknapay.com', 143, '2026-02-24 23:27:32', 1),
(16, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@aknapay.com', 143, '2026-02-25 15:31:27', 1),
(17, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@aknapay.com', 143, '2026-02-28 23:53:23', 1),
(18, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@aknapay.com', 143, '2026-03-01 00:23:07', 1),
(19, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@aknapay.com', 143, '2026-03-01 00:24:52', 1),
(20, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@aknapay.com', 143, '2026-03-01 15:12:50', 1),
(21, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@aknapay.com', 143, '2026-03-02 01:35:44', 1),
(22, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@aknapay.com', 143, '2026-03-03 10:32:25', 1),
(23, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@aknapay.com', 143, '2026-03-10 20:59:30', 1),
(24, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@aknapay.com', 143, '2026-03-11 10:11:30', 1),
(25, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@aknapay.com', 143, '2026-03-11 13:15:36', 1),
(26, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@aknapay.com', 143, '2026-03-16 08:30:12', 1),
(27, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@aknapay.com', 143, '2026-03-16 22:35:19', 1),
(28, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'email_password', 'admin@aknapay.com', 143, '2026-03-17 12:40:59', 1);

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

--
-- Table structure for table `auth_permissions_users`
--

CREATE TABLE `auth_permissions_users` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED NOT NULL,
  `permission` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `auth_permissions_users`
--

INSERT INTO `auth_permissions_users` (`id`, `user_id`, `permission`, `created_at`) VALUES
(18, 143, 'admin.access', '2026-03-11 10:34:27'),
(19, 143, 'admin.create', '2026-03-11 10:34:27'),
(20, 143, 'admin.update', '2026-03-11 10:34:27'),
(21, 143, 'admin.settings', '2026-03-11 10:34:27'),
(22, 143, 'users.manage-admins', '2026-03-11 10:34:27'),
(23, 143, 'users.create', '2026-03-11 10:34:27'),
(24, 143, 'users.edit', '2026-03-11 10:34:27'),
(25, 143, 'users.delete', '2026-03-11 10:34:27'),
(26, 143, 'wallet.view', '2026-03-11 10:34:27'),
(27, 143, 'wallet.debit', '2026-03-11 10:34:27'),
(28, 143, 'wallet.credit', '2026-03-11 10:34:27'),
(29, 143, 'wallet.revoke', '2026-03-11 10:34:27'),
(30, 143, 'transactions.view', '2026-03-11 10:34:27'),
(31, 143, 'transactions.reverse', '2026-03-11 10:34:27'),
(32, 143, 'kyc.approve', '2026-03-11 10:34:27'),
(33, 143, 'beta.access', '2026-03-11 10:34:27');

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

--
-- Table structure for table `auth_remember_tokens`
--

CREATE TABLE `auth_remember_tokens` (
  `id` int UNSIGNED NOT NULL,
  `selector` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `hashedValidator` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `user_id` int UNSIGNED NOT NULL,
  `expires` datetime NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `auth_token_logins`
--

CREATE TABLE `auth_token_logins` (
  `id` int UNSIGNED NOT NULL,
  `ip_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `user_agent` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `id_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `identifier` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `date` datetime NOT NULL,
  `success` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `auth_token_logins`
--

INSERT INTO `auth_token_logins` (`id`, `ip_address`, `user_agent`, `id_type`, `identifier`, `user_id`, `date`, `success`) VALUES
(1, '::1', 'PostmanRuntime/7.51.0', 'access_token', 'Bearer c4f8e5f84960dbcc795b902d501826de92d5ccfd9aa109e019f87a9e041a40d9', NULL, '2025-12-20 10:29:54', 0),
(2, '::1', 'PostmanRuntime/7.51.0', 'access_token', 'Bearer c4f8e5f84960dbcc795b902d501826de92d5ccfd9aa109e019f87a9e041a40d9', NULL, '2025-12-20 10:29:54', 0),
(3, '::1', 'PostmanRuntime/7.51.0', 'access_token', 'Bearer c4f8e5f84960dbcc795b902d501826de92d5ccfd9aa109e019f87a9e041a40d9', NULL, '2025-12-20 10:29:54', 0),
(4, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:12:21', 0),
(5, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:12:21', 0),
(6, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:12:21', 0),
(7, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:31:08', 0),
(8, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:31:08', 0),
(9, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:31:08', 0),
(10, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:33:49', 0),
(11, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:33:49', 0),
(12, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:33:49', 0),
(13, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:37:03', 0),
(14, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:37:03', 0),
(15, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:37:03', 0),
(16, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:37:20', 0),
(17, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:37:20', 0),
(18, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:37:20', 0),
(19, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:38:44', 0),
(20, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:38:44', 0),
(21, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:38:44', 0),
(22, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:45:18', 0),
(23, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:45:18', 0),
(24, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:45:18', 0),
(25, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:49:26', 0),
(26, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:49:26', 0),
(27, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:49:26', 0),
(28, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:50:03', 0),
(29, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:50:04', 0),
(30, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:50:04', 0),
(31, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:52:22', 0),
(32, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:52:22', 0),
(33, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:52:22', 0),
(34, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:52:51', 0),
(35, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:52:51', 0),
(36, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:52:51', 0),
(37, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:53:43', 0),
(38, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:53:43', 0),
(39, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:53:43', 0),
(40, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:54:39', 0),
(41, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:54:39', 0),
(42, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:54:39', 0),
(43, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:57:35', 0),
(44, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:57:35', 0),
(45, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:57:35', 0),
(46, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:58:02', 0),
(47, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:58:02', 0),
(48, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:58:02', 0),
(49, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:58:15', 0),
(50, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:58:15', 0),
(51, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-03 23:58:15', 0),
(52, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-04 00:00:24', 0),
(53, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-04 00:00:24', 0),
(54, '102.89.46.163', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer f2de128e58289244ab2d501681db1ff8d31654786435e7f713c5e8194f015a02', NULL, '2026-01-04 00:00:24', 0),
(55, '197.211.52.67', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer fcefac93c5eb5187a2da8dac6a9154a37c964d3d1209eec228e4d25f7d4b6bb9', NULL, '2026-01-26 11:14:04', 0),
(56, '197.211.52.67', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer fcefac93c5eb5187a2da8dac6a9154a37c964d3d1209eec228e4d25f7d4b6bb9', NULL, '2026-01-26 11:14:05', 0),
(57, '197.211.52.67', 'Dart/3.10 (dart:io)', 'access_token', 'Bearer fcefac93c5eb5187a2da8dac6a9154a37c964d3d1209eec228e4d25f7d4b6bb9', NULL, '2026-01-26 11:14:05', 0);

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

--
-- Table structure for table `bill_fulfillments`
--

CREATE TABLE `bill_fulfillments` (
  `id` bigint UNSIGNED NOT NULL,
  `bill_request_id` bigint UNSIGNED NOT NULL,
  `provider_used` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `provider_ref` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `message` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `data` json DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bill_fulfillments`
--

INSERT INTO `bill_fulfillments` (`id`, `bill_request_id`, `provider_used`, `provider_ref`, `message`, `data`, `created_at`) VALUES
(10, 41, 'PAYSCRIBE', '4b3d38af-5ad3-4d3f-8044-91d0377e976b', 'Order received. Transaction in progress.', '{\"ref\": \"AIR-694d58a87261b\", \"amount\": 100, \"product\": \"mtn\", \"category\": \"airtime\", \"discount\": 2.5, \"trans_id\": \"4b3d38af-5ad3-4d3f-8044-91d0377e976b\", \"processed\": [{\"id\": \"4b3d38af-5ad3-4d3f-8044-91d0377e976b\", \"amount\": 100, \"number\": \"08149983395\", \"remark\": \"Purchase successfully; ref: 6701727659\"}], \"created_at\": \"2025-12-25 16:30:52\", \"total_charge\": 97.5, \"transaction_status\": \"processing\"}', '2025-12-25 15:30:50'),
(11, 43, 'PAYSCRIBE', '3330b835-61e0-4142-a132-7dad052e5c07', 'Order received. Transaction in progress.', '{\"ref\": \"AIR-694d5aad66c51\", \"amount\": 100, \"product\": \"mtn\", \"category\": \"airtime\", \"discount\": 2.5, \"trans_id\": \"3330b835-61e0-4142-a132-7dad052e5c07\", \"processed\": [{\"id\": \"3330b835-61e0-4142-a132-7dad052e5c07\", \"amount\": 100, \"number\": \"08149983395\", \"remark\": \"Purchase successfully; ref: 6701728083\"}], \"created_at\": \"2025-12-25 16:39:29\", \"total_charge\": 97.5, \"transaction_status\": \"processing\"}', '2025-12-25 15:39:27'),
(12, 44, 'PAYSCRIBE', '45e88870-00bf-4d6e-bc48-136f1ca6876d', 'Order received. Transaction in progress.', '{\"ref\": \"AIR-6952fc13c96c0\", \"amount\": 1500, \"product\": \"glo\", \"discount\": 30, \"trans_id\": \"45e88870-00bf-4d6e-bc48-136f1ca6876d\", \"processed\": [{\"id\": \"45e88870-00bf-4d6e-bc48-136f1ca6876d\", \"amount\": 1500, \"number\": \"08118175493\", \"response\": \"Data bundle Topup successful on 08118175493\"}], \"created_at\": \"2025-12-29 23:09:32\", \"total_charge\": 1470, \"transaction_status\": \"success\"}', '2025-12-29 22:09:31'),
(14, 60, 'PAYSCRIBE', 'e13f69e7-4e4a-4514-9aa7-205c82676dad', 'Order received. Transaction in progress.', '{\"ref\": \"AIR-696a47c5227cf\", \"amount\": 100, \"product\": \"mtn\", \"category\": \"airtime\", \"discount\": 2.5, \"trans_id\": \"e13f69e7-4e4a-4514-9aa7-205c82676dad\", \"processed\": [{\"id\": \"e13f69e7-4e4a-4514-9aa7-205c82676dad\", \"amount\": 100, \"number\": \"08149983395\", \"response\": \"\"}], \"created_at\": \"2026-01-16 15:14:29\", \"total_charge\": 97.5, \"transaction_status\": \"processing\"}', '2026-01-16 15:14:29'),
(15, 61, 'PAYSCRIBE', 'f54b21eb-f70f-4204-963d-0783ff61a6fa', 'Order received. Transaction in progress.', '{\"ref\": \"AIR-696a48e6b98b3\", \"amount\": 100, \"product\": \"mtn\", \"category\": \"airtime\", \"discount\": 2.5, \"trans_id\": \"f54b21eb-f70f-4204-963d-0783ff61a6fa\", \"processed\": [{\"id\": \"f54b21eb-f70f-4204-963d-0783ff61a6fa\", \"amount\": 100, \"number\": \"08149983395\", \"response\": \"\"}], \"created_at\": \"2026-01-16 15:19:19\", \"total_charge\": 97.5, \"transaction_status\": \"processing\"}', '2026-01-16 15:19:19'),
(16, 62, 'PAYSCRIBE', '7c264026-68f6-429b-9afb-1b6d4e368c56', 'Order received. Transaction in progress.', '{\"ref\": \"AIR-696ad2406964d\", \"amount\": 100, \"product\": \"mtn\", \"category\": \"airtime\", \"discount\": 2.5, \"trans_id\": \"7c264026-68f6-429b-9afb-1b6d4e368c56\", \"processed\": [{\"id\": \"7c264026-68f6-429b-9afb-1b6d4e368c56\", \"amount\": 100, \"number\": \"08149983395\", \"response\": \"\"}], \"created_at\": \"2026-01-17 01:05:22\", \"total_charge\": 97.5, \"transaction_status\": \"processing\"}', '2026-01-17 01:05:22'),
(17, 63, 'PAYSCRIBE', 'a682aac5-5263-4bd8-800b-59a6d7e90df1', 'Order received. Transaction in progress.', '{\"ref\": \"AIR-696ad8ce53f00\", \"amount\": 100, \"product\": \"mtn\", \"category\": \"airtime\", \"discount\": 2.5, \"trans_id\": \"a682aac5-5263-4bd8-800b-59a6d7e90df1\", \"processed\": [{\"id\": \"a682aac5-5263-4bd8-800b-59a6d7e90df1\", \"amount\": 100, \"number\": \"08149983395\", \"response\": \"\"}], \"created_at\": \"2026-01-17 01:33:19\", \"total_charge\": 97.5, \"transaction_status\": \"processing\"}', '2026-01-17 01:33:19'),
(18, 64, 'PAYSCRIBE', 'b32eea3c-d065-4df6-8fb1-425138e622ab', 'Order received. Transaction in progress.', '{\"ref\": \"AIR-696adb81b7441\", \"amount\": 100, \"product\": \"glo\", \"category\": \"airtime\", \"discount\": 5, \"trans_id\": \"b32eea3c-d065-4df6-8fb1-425138e622ab\", \"processed\": [{\"id\": \"b32eea3c-d065-4df6-8fb1-425138e622ab\", \"amount\": 100, \"number\": \"08118175493\", \"remark\": \"Purchase successfully; ref: 6704203659\"}], \"created_at\": \"2026-01-17 01:44:51\", \"total_charge\": 95, \"transaction_status\": \"processing\"}', '2026-01-17 01:44:51'),
(19, 65, 'PAYSCRIBE', 'ea87ec91-14bf-4401-a755-a5a1ea2959b5', 'Order received. Transaction in progress.', '{\"ref\": \"AIR-696ae63ccb274\", \"amount\": 100, \"product\": \"mtn\", \"category\": \"airtime\", \"discount\": 2.5, \"trans_id\": \"ea87ec91-14bf-4401-a755-a5a1ea2959b5\", \"processed\": [{\"id\": \"ea87ec91-14bf-4401-a755-a5a1ea2959b5\", \"amount\": 100, \"number\": \"08149983395\", \"response\": \"\"}], \"created_at\": \"2026-01-17 02:30:37\", \"total_charge\": 97.5, \"transaction_status\": \"processing\"}', '2026-01-17 02:30:37'),
(20, 66, 'PAYSCRIBE', 'e318523b-76eb-4154-ae38-26d06fe6cb31', 'Order received. Transaction in progress.', '{\"ref\": \"AIR-696ae6cf60890\", \"amount\": 100, \"product\": \"mtn\", \"category\": \"airtime\", \"discount\": 2.5, \"trans_id\": \"e318523b-76eb-4154-ae38-26d06fe6cb31\", \"processed\": [{\"id\": \"e318523b-76eb-4154-ae38-26d06fe6cb31\", \"amount\": 100, \"number\": \"08149983395\", \"response\": \"\"}], \"created_at\": \"2026-01-17 02:33:04\", \"total_charge\": 97.5, \"transaction_status\": \"processing\"}', '2026-01-17 02:33:04'),
(21, 67, 'PAYSCRIBE', 'cfa35fad-d266-4159-b564-d47713331a17', 'Order received. Transaction in progress.', '{\"ref\": \"AIR-696ae732c7a03\", \"amount\": 350, \"product\": \"mtn\", \"discount\": 1.75, \"trans_id\": \"cfa35fad-d266-4159-b564-d47713331a17\", \"processed\": [{\"id\": \"cfa35fad-d266-4159-b564-d47713331a17\", \"amount\": 350, \"number\": \"08149983395\", \"response\": \"Data bundle Topup successful on 08149983395\"}], \"created_at\": \"2026-01-17 02:34:45\", \"total_charge\": 348.25, \"transaction_status\": \"success\"}', '2026-01-17 02:34:46'),
(22, 68, 'PAYSCRIBE', '4ef9fc51-fd3b-4db8-8152-3fe99a88ec18', 'Order received. Transaction in progress.', '{\"ref\": \"AIR-696ae7942b33f\", \"amount\": 350, \"product\": \"mtn\", \"discount\": 1.75, \"trans_id\": \"4ef9fc51-fd3b-4db8-8152-3fe99a88ec18\", \"processed\": [{\"id\": \"4ef9fc51-fd3b-4db8-8152-3fe99a88ec18\", \"amount\": 350, \"number\": \"08149983395\", \"response\": \"Data bundle Topup successful on 08149983395\"}], \"created_at\": \"2026-01-17 02:36:24\", \"total_charge\": 348.25, \"transaction_status\": \"success\"}', '2026-01-17 02:36:24');

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

--
-- Table structure for table `bill_idempotencies`
--

CREATE TABLE `bill_idempotencies` (
  `id` bigint UNSIGNED NOT NULL,
  `idempotency_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `reference` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `response` json DEFAULT NULL,
  `status` enum('started','completed','failed') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `bill_idempotencies`
--

INSERT INTO `bill_idempotencies` (`id`, `idempotency_key`, `user_id`, `reference`, `response`, `status`, `created_at`, `updated_at`) VALUES
(84, 'a9233fe6-394d-4e8f-bbd1-fe416ccee783', 72, 'AIR-694d5a534ac9f', NULL, 'failed', '2025-12-25 15:37:55', '2025-12-25 15:37:55'),
(85, '84816caa-8d82-43fd-be0c-ce3c933e6714', 72, 'AIR-694d5a7bcd1c8', NULL, 'failed', '2025-12-25 15:38:35', '2025-12-25 15:38:42'),
(86, '753cafaf-c88c-4cbd-82c3-e7e80dc8e2bb', 72, 'AIR-694d5aad66c51', '{\"status\": true, \"message\": \"Airtime purchase successful\", \"reference\": \"AIR-694d5aad66c51\"}', 'completed', '2025-12-25 15:39:25', '2025-12-25 15:39:27'),
(87, '88d78b67-d7cf-46bc-b5e4-5339a1b04a7b', 72, 'AIR-6952fc13c96c0', '{\"status\": true, \"message\": \"Data plan purchase successful\", \"reference\": \"AIR-6952fc13c96c0\"}', 'completed', '2025-12-29 22:09:25', '2025-12-29 22:09:31'),
(83, '9d1bcbe9-8524-47b7-b34b-c0d51454beed', 72, 'AIR-694d58a87261b', '{\"status\": true, \"message\": \"Airtime purchase successful\", \"reference\": \"AIR-694d58a87261b\"}', 'completed', '2025-12-25 15:30:48', '2025-12-25 15:30:50'),
(88, 'e12db969-4c9c-46c3-bf83-f039a5abeb11', 72, 'AIR-695d642a599ce', NULL, 'failed', '2026-01-06 20:36:10', '2026-01-06 20:36:12'),
(89, '07743b57-f28c-4aba-8560-2f0608ec1496', 72, 'AIR-695d660c30fed', NULL, 'failed', '2026-01-06 20:44:12', '2026-01-06 20:44:14'),
(90, 'ddd7b3da-dfb8-4b2a-b118-43bd2cf3f6f0', 72, 'AIR-695d6ab854dec', NULL, 'failed', '2026-01-06 21:04:08', '2026-01-06 21:04:10'),
(91, '4f79373c-3739-4bd5-8cce-4458dcb69f4e', 72, 'AIR-695d6b2a38c78', NULL, 'failed', '2026-01-06 21:06:02', '2026-01-06 21:06:04'),
(92, '62df8c97-b195-46fa-ad77-2c07a6ac3877', 72, 'AIR-695d6b9bb3c52', NULL, 'failed', '2026-01-06 21:07:55', '2026-01-06 21:07:57'),
(93, 'e315f944-ba59-4c18-b72e-45bc1f75b646', 72, 'AIR-695d6c98e19f3', NULL, 'failed', '2026-01-06 21:12:08', '2026-01-06 21:12:10'),
(94, 'ebc860d8-53a1-4205-8b68-b866d496c3ef', 72, 'AIR-695d6cd08155b', NULL, 'failed', '2026-01-06 21:13:04', '2026-01-06 21:13:07'),
(95, 'cae52b79-84c9-440d-9105-5274ae33314f', 72, 'AIR-695d6d034de0a', NULL, 'failed', '2026-01-06 21:13:55', '2026-01-06 21:13:57'),
(96, '4a857922-f967-44fd-a8c5-02f45e088757', 72, 'AIR-695d6d37d9e07', NULL, 'failed', '2026-01-06 21:14:47', '2026-01-06 21:14:47'),
(97, '318e3673-a986-40ca-99e1-57b8d129b2e4', 72, 'AIR-695d6df0c9b6c', NULL, 'failed', '2026-01-06 21:17:52', '2026-01-06 21:17:52'),
(98, 'fc054d4c-0e34-4349-ae3b-662b3d872f26', 72, 'AIR-695d6e55d4159', NULL, 'failed', '2026-01-06 21:19:33', '2026-01-06 21:19:36'),
(99, 'c24326a6-fcab-444f-bbf8-6dfe506263ed', 72, 'AIR-695d71a5aff15', NULL, 'failed', '2026-01-06 21:33:41', '2026-01-06 21:33:43'),
(100, '390e7c67-7f1f-40e2-9d17-d84e15ad90cf', 72, 'AIR-695d8c99f1220', NULL, 'failed', '2026-01-06 23:28:41', '2026-01-06 23:28:44'),
(101, 'fbaacb81-fe56-4477-80d5-015045ae6632', 72, 'AIR-695d8cee7c200', NULL, 'failed', '2026-01-06 23:30:06', '2026-01-06 23:30:08'),
(102, '044d78d3-943a-4462-923d-7398e6926072', 72, 'AIR-696a3f9715ca7', NULL, 'failed', '2026-01-16 14:39:35', '2026-01-16 14:39:39'),
(103, 'f04ebd8b-37b6-44df-aa00-25b6e775423b', 72, 'AIR-696a41a6e6f69', NULL, 'failed', '2026-01-16 14:48:22', '2026-01-16 14:48:25'),
(104, '35fda402-8b87-40b2-99f3-02d2f9d44888', 72, 'AIR-696a41d5c3e1e', NULL, 'failed', '2026-01-16 14:49:09', '2026-01-16 14:49:10'),
(105, '8507e1f7-80c0-4aef-b5cd-d5df4082a886', 72, 'AIR-696a47c5227cf', '{\"status\": true, \"message\": \"Airtime purchase successful\", \"receipt\": {\"amount\": 100, \"network\": \"MTN\", \"recipient\": \"08149983395\", \"transaction_date\": \"2026-01-16 15:14:29\", \"transaction_reference\": \"AIR-696a47c5227cf\"}, \"reference\": \"AIR-696a47c5227cf\"}', 'completed', '2026-01-16 15:14:29', '2026-01-16 15:14:29'),
(106, 'e356fbc0-b312-499c-b5dc-821c91e2436a', 72, 'AIR-696a48e6b98b3', '{\"status\": true, \"message\": \"Airtime purchase successful\", \"receipt\": {\"amount\": 100, \"network\": \"MTN\", \"recipient\": \"08149983395\", \"transaction_date\": \"2026-01-16 15:19:19\", \"transaction_reference\": \"AIR-696a48e6b98b3\"}, \"reference\": \"AIR-696a48e6b98b3\"}', 'completed', '2026-01-16 15:19:18', '2026-01-16 15:19:19'),
(107, '93d9fd74-d139-4a8c-9d84-de921a9f8033', 72, 'AIR-696ad2406964d', '{\"status\": true, \"message\": \"Airtime purchase successful\", \"receipt\": {\"amount\": 100, \"network\": \"MTN\", \"recipient\": \"08149983395\", \"transaction_date\": \"2026-01-17 01:05:22\", \"transaction_reference\": \"AIR-696ad2406964d\"}, \"reference\": \"AIR-696ad2406964d\"}', 'completed', '2026-01-17 01:05:20', '2026-01-17 01:05:22'),
(108, 'f0c218fe-f700-490e-9d05-e0d89aae2133', 72, 'AIR-696ad8ce53f00', '{\"status\": true, \"message\": \"Airtime purchase successful\", \"receipt\": {\"amount\": 100, \"network\": \"MTN\", \"recipient\": \"08149983395\", \"transaction_date\": \"2026-01-17 01:33:19\", \"transaction_reference\": \"AIR-696ad8ce53f00\"}, \"reference\": \"AIR-696ad8ce53f00\"}', 'completed', '2026-01-17 01:33:18', '2026-01-17 01:33:19'),
(109, '14682f9a-3f50-4952-87eb-86eb475b2364', 72, 'AIR-696adb81b7441', '{\"status\": true, \"message\": \"Airtime purchase successful\", \"receipt\": {\"amount\": 100, \"network\": \"Glo\", \"recipient\": \"08118175493\", \"transaction_date\": \"2026-01-17 01:44:51\", \"transaction_reference\": \"AIR-696adb81b7441\"}, \"reference\": \"AIR-696adb81b7441\"}', 'completed', '2026-01-17 01:44:49', '2026-01-17 01:44:51'),
(110, '583e14eb-f954-4588-b40f-cec4e3988c06', 72, 'AIR-696ae63ccb274', '{\"status\": true, \"message\": \"Airtime purchase successful\", \"receipt\": {\"amount\": 100, \"network\": \"MTN\", \"recipient\": \"08149983395\", \"transaction_date\": \"2026-01-17 02:30:37\", \"transaction_reference\": \"AIR-696ae63ccb274\"}, \"reference\": \"AIR-696ae63ccb274\"}', 'completed', '2026-01-17 02:30:36', '2026-01-17 02:30:37'),
(111, '06465d39-151a-4ced-a514-84aeddda31e7', 72, 'AIR-696ae6cf60890', '{\"status\": true, \"message\": \"Airtime purchase successful\", \"receipt\": {\"amount\": 100, \"network\": \"MTN\", \"recipient\": \"08149983395\", \"transaction_date\": \"2026-01-17 02:33:04\", \"transaction_reference\": \"AIR-696ae6cf60890\"}, \"reference\": \"AIR-696ae6cf60890\"}', 'completed', '2026-01-17 02:33:03', '2026-01-17 02:33:04'),
(112, '7604170d-9c4f-42f8-b921-ddfd7e868bf2', 72, 'AIR-696ae732c7a03', '{\"status\": true, \"message\": \"Data plan purchase successful\", \"receipt\": {\"amount\": 350, \"network\": \"MTN\", \"data_plan\": \"500MB for Daily - Daily\", \"recipient\": \"08149983395\", \"transaction_date\": \"2026-01-17 02:34:46\", \"transaction_reference\": \"AIR-696ae732c7a03\"}, \"reference\": \"AIR-696ae732c7a03\"}', 'completed', '2026-01-17 02:34:42', '2026-01-17 02:34:46'),
(113, 'b40d1d5b-a8f5-4ea3-9690-504e03a3be3b', 72, 'AIR-696ae7942b33f', '{\"status\": true, \"message\": \"Data plan purchase successful\", \"receipt\": {\"amount\": 350, \"network\": \"MTN\", \"data_plan\": \"500MB for Daily - Daily\", \"recipient\": \"08149983395\", \"transaction_date\": \"2026-01-17 02:36:24\", \"transaction_reference\": \"AIR-696ae7942b33f\"}, \"reference\": \"AIR-696ae7942b33f\"}', 'completed', '2026-01-17 02:36:20', '2026-01-17 02:36:24');

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

--
-- Table structure for table `bill_requests`
--

CREATE TABLE `bill_requests` (
  `id` bigint UNSIGNED NOT NULL,
  `reference` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `provider_id` bigint UNSIGNED DEFAULT NULL,
  `service_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `payload` json NOT NULL,
  `status` enum('initiated','sent','fulfilled','failed','processing','reconciled','delivered') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'initiated',
  `provider_used` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bill_requests`
--

INSERT INTO `bill_requests` (`id`, `reference`, `user_id`, `provider_id`, `service_type`, `amount`, `payload`, `status`, `provider_used`, `created_at`, `updated_at`) VALUES
(41, 'AIR-694d58a87261b', 72, 41, 'airtime', 100.00, '{\"amount\": \"100\", \"network\": \"MTN\", \"reference\": \"AIR-694d58a87261b\", \"phone_number\": \"08149983395\"}', 'fulfilled', 'PAYSCRIBE', '2025-12-25 15:30:48', NULL),
(43, 'AIR-694d5aad66c51', 72, 43, 'airtime', 100.00, '{\"amount\": \"100\", \"network\": \"MTN\", \"reference\": \"AIR-694d5aad66c51\", \"phone_number\": \"08149983395\"}', 'fulfilled', 'PAYSCRIBE', '2025-12-25 15:39:25', NULL),
(44, 'AIR-6952fc13c96c0', 72, 44, 'data', 1500.00, '{\"amount\": \"1500\", \"network\": \"Glo\", \"plan_code\": \"PSPLAN_313\", \"plan_name\": \"7.5GB - 30 days\", \"reference\": \"AIR-6952fc13c96c0\", \"phone_number\": \"08118175493\"}', 'fulfilled', 'PAYSCRIBE', '2025-12-29 22:09:25', NULL),
(60, 'AIR-696a47c5227cf', 72, 60, 'airtime', 100.00, '{\"amount\": 100, \"network\": \"MTN\", \"reference\": \"AIR-696a47c5227cf\", \"phone_number\": \"08149983395\"}', 'fulfilled', 'PAYSCRIBE', '2026-01-16 15:14:29', NULL),
(61, 'AIR-696a48e6b98b3', 72, 61, 'airtime', 100.00, '{\"amount\": 100, \"network\": \"MTN\", \"reference\": \"AIR-696a48e6b98b3\", \"phone_number\": \"08149983395\"}', 'fulfilled', 'PAYSCRIBE', '2026-01-16 15:19:18', NULL),
(62, 'AIR-696ad2406964d', 72, 62, 'airtime', 100.00, '{\"amount\": 100, \"network\": \"MTN\", \"reference\": \"AIR-696ad2406964d\", \"phone_number\": \"08149983395\"}', 'fulfilled', 'PAYSCRIBE', '2026-01-17 01:05:21', NULL),
(63, 'AIR-696ad8ce53f00', 72, 63, 'airtime', 100.00, '{\"amount\": 100, \"network\": \"MTN\", \"reference\": \"AIR-696ad8ce53f00\", \"phone_number\": \"08149983395\"}', 'fulfilled', 'PAYSCRIBE', '2026-01-17 01:33:18', NULL),
(64, 'AIR-696adb81b7441', 72, 64, 'airtime', 100.00, '{\"amount\": 100, \"network\": \"Glo\", \"reference\": \"AIR-696adb81b7441\", \"phone_number\": \"08118175493\"}', 'fulfilled', 'PAYSCRIBE', '2026-01-17 01:44:49', NULL),
(65, 'AIR-696ae63ccb274', 72, 65, 'airtime', 100.00, '{\"amount\": 100, \"network\": \"MTN\", \"reference\": \"AIR-696ae63ccb274\", \"phone_number\": \"08149983395\"}', 'fulfilled', 'PAYSCRIBE', '2026-01-17 02:30:36', NULL),
(66, 'AIR-696ae6cf60890', 72, 66, 'airtime', 100.00, '{\"amount\": 100, \"network\": \"MTN\", \"reference\": \"AIR-696ae6cf60890\", \"phone_number\": \"08149983395\"}', 'fulfilled', 'PAYSCRIBE', '2026-01-17 02:33:03', NULL),
(67, 'AIR-696ae732c7a03', 72, 67, 'data', 350.00, '{\"amount\": 350, \"network\": \"MTN\", \"plan_code\": \"PSPLAN_2795\", \"plan_name\": \"500MB for Daily - Daily\", \"reference\": \"AIR-696ae732c7a03\", \"phone_number\": \"08149983395\"}', 'fulfilled', 'PAYSCRIBE', '2026-02-20 02:34:42', NULL),
(68, 'AIR-696ae7942b33f', 72, 68, 'data', 350.00, '{\"amount\": 350, \"network\": \"MTN\", \"plan_code\": \"PSPLAN_2795\", \"plan_name\": \"500MB for Daily - Daily\", \"reference\": \"AIR-696ae7942b33f\", \"phone_number\": \"08149983395\"}', 'fulfilled', 'PAYSCRIBE', '2026-02-27 02:36:21', NULL);

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

--
-- Table structure for table `biometric_tokens`
--

CREATE TABLE `biometric_tokens` (
  `id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `device_fingerprint` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `token` char(64) NOT NULL,
  `revoked` tinyint(1) DEFAULT '0',
  `created_at` datetime NOT NULL,
  `last_used_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `biometric_tokens`
--

INSERT INTO `biometric_tokens` (`id`, `user_id`, `device_fingerprint`, `token`, `revoked`, `created_at`, `last_used_at`) VALUES
(18, 72, '4ba4e4b9593236ec24c410156cce2477ccb072784cbf2e4958c918b9c4c9c71d', '538dd40a1f76b304a7af9560d4d7ad3f7d84329911f5b89c51172809d79af9b1', 0, '2026-01-06 23:14:12', NULL),
(19, 127, '4ba4e4b9593236ec24c410156cce2477ccb072784cbf2e4958c918b9c4c9c71d', '296dfa8655d01c7ccade9e9d344c865db199e09fbb5d333e1d261f912cf9ce4c', 0, '2026-01-27 03:57:15', NULL);

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

--
-- Table structure for table `business_profiles`
--

CREATE TABLE `business_profiles` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `business_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `first_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `middle_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `last_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `business_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `cac_number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `rc_number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `industry` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `kyc_status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'pending',
  `tier_level` int NOT NULL DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `cards`
--

CREATE TABLE `cards` (
  `id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `provider` varchar(50) NOT NULL DEFAULT 'payscribe',
  `provider_card_id` char(36) NOT NULL,
  `provider_customer_id` char(36) NOT NULL,
  `currency` char(3) NOT NULL,
  `card_type` varchar(20) NOT NULL,
  `brand` varchar(20) NOT NULL,
  `first_six` char(6) NOT NULL,
  `last_four` char(4) NOT NULL,
  `masked` varchar(30) NOT NULL,
  `expiry` char(5) NOT NULL,
  `balance` decimal(12,2) NOT NULL DEFAULT '0.00',
  `status` varchar(20) NOT NULL,
  `billing_address` text,
  `billing_city` varchar(100) DEFAULT NULL,
  `billing_state` varchar(100) DEFAULT NULL,
  `billing_country` char(2) DEFAULT NULL,
  `billing_postal_code` varchar(20) DEFAULT NULL,
  `is_terminated` tinyint(1) DEFAULT '0',
  `terminated_at` datetime DEFAULT NULL,
  `provider_created_at` datetime DEFAULT NULL,
  `provider_updated_at` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `card_idempotencies`
--

CREATE TABLE `card_idempotencies` (
  `id` bigint UNSIGNED NOT NULL,
  `idempotency_key` varchar(100) NOT NULL,
  `action` varchar(50) NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `provider_reference` varchar(100) DEFAULT NULL,
  `response` json NOT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `card_limits`
--

CREATE TABLE `card_limits` (
  `id` bigint UNSIGNED NOT NULL,
  `kyc_tier` varchar(50) NOT NULL,
  `currency` char(3) NOT NULL DEFAULT 'USD',
  `daily_topup_limit` decimal(12,2) NOT NULL,
  `monthly_topup_limit` decimal(12,2) NOT NULL,
  `daily_withdraw_limit` decimal(12,2) NOT NULL,
  `monthly_withdraw_limit` decimal(12,2) NOT NULL,
  `max_card_balance` decimal(12,2) NOT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `card_transactions`
--

CREATE TABLE `card_transactions` (
  `id` bigint UNSIGNED NOT NULL,
  `card_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `provider` varchar(50) NOT NULL DEFAULT 'payscribe',
  `provider_reference` varchar(100) DEFAULT NULL,
  `event` enum('topup','withdraw','spend','reversal','fee') NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `currency` char(3) NOT NULL DEFAULT 'USD',
  `status` enum('pending','success','failed') NOT NULL,
  `wallet_reference` varchar(100) DEFAULT NULL,
  `narration` varchar(255) DEFAULT NULL,
  `payload` json DEFAULT NULL,
  `occurred_at` datetime NOT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `customer_profiles`
--

CREATE TABLE `customer_profiles` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `first_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `middle_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `last_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `gender` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `city` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `state` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `avatar` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `postal_code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `kyc_status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'pending',
  `tier_level` int NOT NULL DEFAULT '1',
  `transaction_pin` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `customer_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `payscribe_customer_id` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `bank_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `account_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `account_number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `bank_code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `customer_profiles`
--

INSERT INTO `customer_profiles` (`id`, `user_id`, `first_name`, `middle_name`, `last_name`, `phone`, `dob`, `gender`, `address`, `city`, `state`, `avatar`, `postal_code`, `kyc_status`, `tier_level`, `transaction_pin`, `customer_code`, `payscribe_customer_id`, `bank_name`, `account_name`, `account_number`, `bank_code`, `created_at`, `updated_at`) VALUES
(39, 72, 'Samson', '', 'Gege', '+2348149983395', '2000-05-15', 'Male', 'Ajah Ilaje', 'Ilesa Town', 'Osun', 'https://res.cloudinary.com/prudentcore/image/upload/v1769480590/avatars/user_72.jpg', '233085', 'approved', 2, '$2y$10$kcxXxbUln2/BOzl5Y/zzsOldhFyA5ObCAVfDuznHts0gh0HUk7Ose', NULL, NULL, 'OPAY', 'OHUNAYO  GEGE', '8149983395', '100004', '2025-12-20 10:14:10', '2026-01-27 03:23:12'),
(46, 127, 'Ohunayo', ' ', 'Gege', '+2348118175493', '1994-02-10', 'Male', 'Ajah Lag', 'Ilesha', 'Osun', 'https://bitbiz.ng/uploads/teams/damzy.jpg', '100295', 'pending', 2, '$2y$10$jSsilVfS9BzcQFxK4OJqp.ormhXplKuhc3Arg1MWdubrAiW1DY8ri', NULL, NULL, NULL, NULL, NULL, NULL, '2026-01-26 12:40:28', '2026-02-08 16:01:45');

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

--
-- Table structure for table `device_tokens`
--

CREATE TABLE `device_tokens` (
  `id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `provider` varchar(20) NOT NULL DEFAULT 'fcm',
  `token` text NOT NULL,
  `meta` json DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `device_tokens`
--

INSERT INTO `device_tokens` (`id`, `user_id`, `provider`, `token`, `meta`, `created_at`, `updated_at`) VALUES
(1, 72, 'fcm', 'fkfDXuMGTr-pnxb0gllCBX:APA91bHH8OofJxj3DkdTwxNPord7R6znXkTY8JAoO7LdIqjFVIXmZ7LgdD5-3pRW0SV8wIRXM6Dzv0Qx4NmArTVKQt91G4r8HKFQgzn1DYn_P05O76s-3Fw', '{\"model\": \"samsung SM-A156E\", \"version\": \"SDK 36\", \"platform\": \"android\"}', '2026-01-06 18:46:35', '2026-01-17 00:16:56'),
(2, 127, 'fcm', 'fkfDXuMGTr-pnxb0gllCBX:APA91bHH8OofJxj3DkdTwxNPord7R6znXkTY8JAoO7LdIqjFVIXmZ7LgdD5-3pRW0SV8wIRXM6Dzv0Qx4NmArTVKQt91G4r8HKFQgzn1DYn_P05O76s-3Fw', '{\"model\": \"samsung SM-A156E\", \"version\": \"SDK 36\", \"platform\": \"android\"}', '2026-01-06 18:46:35', '2026-01-17 00:16:56');

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

--
-- Table structure for table `device_verifications`
--

CREATE TABLE `device_verifications` (
  `id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `device_id` varchar(128) NOT NULL,
  `method` enum('pin','biometric') NOT NULL,
  `status` enum('pending','approved','rejected') DEFAULT 'pending',
  `expires_at` datetime NOT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `disputes`
--

CREATE TABLE `disputes` (
  `id` bigint NOT NULL,
  `reference` varchar(64) DEFAULT NULL,
  `wallet_id` int DEFAULT NULL,
  `type` enum('provider','customer','system') DEFAULT NULL,
  `reason` text,
  `status` enum('open','under_review','resolved','reversed') DEFAULT NULL,
  `meta` json DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `disputes`
--

INSERT INTO `disputes` (`id`, `reference`, `wallet_id`, `type`, `reason`, `status`, `meta`, `created_at`, `updated_at`) VALUES
(72, 'AIR-694d5a7bcd1c8', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 71}', '2025-12-25 15:38:42', '2025-12-25 15:38:42'),
(70, 'AIR-694d5a534ac9f', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 69}', '2025-12-25 15:37:55', '2025-12-25 15:37:55'),
(71, 'AIR-694d5a7bcd1c8', 18, 'provider', 'All providers failed', 'open', '{\"amount\": \"100\", \"service\": \"airtime\"}', '2025-12-25 15:38:42', '2025-12-25 15:38:42'),
(69, 'AIR-694d5a534ac9f', 18, 'provider', 'Attempt to read property \"direction\" on null', 'open', '{\"amount\": \"100\", \"service\": \"airtime\"}', '2025-12-25 15:37:55', '2025-12-25 15:37:55'),
(73, 'AIR-695d642a599ce', 18, 'provider', 'All providers failed', 'open', '{\"amount\": 100, \"service\": \"airtime\"}', '2026-01-06 20:36:12', '2026-01-06 20:36:12'),
(74, 'AIR-695d642a599ce', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 73}', '2026-01-06 20:36:12', '2026-01-06 20:36:12'),
(75, 'AIR-695d660c30fed', 18, 'provider', 'All providers failed', 'open', '{\"amount\": 100, \"service\": \"airtime\"}', '2026-01-06 20:44:14', '2026-01-06 20:44:14'),
(76, 'AIR-695d660c30fed', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 75}', '2026-01-06 20:44:14', '2026-01-06 20:44:14'),
(77, 'AIR-695d6ab854dec', 18, 'provider', 'All providers failed', 'open', '{\"amount\": 100, \"service\": \"airtime\"}', '2026-01-06 21:04:10', '2026-01-06 21:04:10'),
(78, 'AIR-695d6ab854dec', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 77}', '2026-01-06 21:04:10', '2026-01-06 21:04:10'),
(79, 'AIR-695d6b2a38c78', 18, 'provider', 'All providers failed', 'open', '{\"amount\": 100, \"service\": \"airtime\"}', '2026-01-06 21:06:04', '2026-01-06 21:06:04'),
(80, 'AIR-695d6b2a38c78', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 79}', '2026-01-06 21:06:04', '2026-01-06 21:06:04'),
(81, 'AIR-695d6b9bb3c52', 18, 'provider', 'All providers failed', 'open', '{\"amount\": 100, \"service\": \"airtime\"}', '2026-01-06 21:07:57', '2026-01-06 21:07:57'),
(82, 'AIR-695d6b9bb3c52', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 81}', '2026-01-06 21:07:57', '2026-01-06 21:07:57'),
(83, 'AIR-695d6c98e19f3', 18, 'provider', 'All providers failed', 'open', '{\"amount\": 100, \"service\": \"airtime\"}', '2026-01-06 21:12:10', '2026-01-06 21:12:10'),
(84, 'AIR-695d6c98e19f3', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 83}', '2026-01-06 21:12:10', '2026-01-06 21:12:10'),
(85, 'AIR-695d6cd08155b', 18, 'provider', 'All providers failed', 'open', '{\"amount\": 100, \"service\": \"airtime\"}', '2026-01-06 21:13:07', '2026-01-06 21:13:07'),
(86, 'AIR-695d6cd08155b', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 85}', '2026-01-06 21:13:07', '2026-01-06 21:13:07'),
(87, 'AIR-695d6d034de0a', 18, 'provider', 'All providers failed', 'open', '{\"amount\": 100, \"service\": \"airtime\"}', '2026-01-06 21:13:57', '2026-01-06 21:13:57'),
(88, 'AIR-695d6d034de0a', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 87}', '2026-01-06 21:13:57', '2026-01-06 21:13:57'),
(89, 'AIR-695d6d37d9e07', 18, 'provider', 'Additional verification required', 'open', '{\"amount\": 100, \"service\": \"airtime\"}', '2026-01-06 21:14:47', '2026-01-06 21:14:47'),
(90, 'AIR-695d6d37d9e07', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 89}', '2026-01-06 21:14:47', '2026-01-06 21:14:47'),
(91, 'AIR-695d6df0c9b6c', 18, 'provider', 'Additional verification required', 'open', '{\"amount\": 100, \"service\": \"airtime\"}', '2026-01-06 21:17:52', '2026-01-06 21:17:52'),
(92, 'AIR-695d6df0c9b6c', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 91}', '2026-01-06 21:17:52', '2026-01-06 21:17:52'),
(93, 'AIR-695d6e55d4159', 18, 'provider', 'All providers failed', 'open', '{\"amount\": 100, \"service\": \"airtime\"}', '2026-01-06 21:19:36', '2026-01-06 21:19:36'),
(94, 'AIR-695d6e55d4159', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 93}', '2026-01-06 21:19:36', '2026-01-06 21:19:36'),
(95, 'AIR-695d71a5aff15', 18, 'provider', 'All providers failed', 'open', '{\"amount\": 100, \"service\": \"airtime\"}', '2026-01-06 21:33:43', '2026-01-06 21:33:43'),
(96, 'AIR-695d71a5aff15', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 95}', '2026-01-06 21:33:43', '2026-01-06 21:33:43'),
(97, 'AIR-695d8c99f1220', 18, 'provider', 'All providers failed', 'open', '{\"amount\": 100, \"service\": \"airtime\"}', '2026-01-06 23:28:44', '2026-01-06 23:28:44'),
(98, 'AIR-695d8c99f1220', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 97}', '2026-01-06 23:28:44', '2026-01-06 23:28:44'),
(99, 'AIR-695d8cee7c200', 18, 'provider', 'All providers failed', 'open', '{\"amount\": 100, \"service\": \"airtime\"}', '2026-01-06 23:30:08', '2026-01-06 23:30:08'),
(100, 'AIR-695d8cee7c200', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 99}', '2026-01-06 23:30:08', '2026-01-06 23:30:08'),
(101, 'AIR-696a3f9715ca7', 18, 'provider', 'All providers failed', 'open', '{\"amount\": 100, \"service\": \"airtime\"}', '2026-01-16 14:39:39', '2026-01-16 14:39:39'),
(102, 'AIR-696a3f9715ca7', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 101}', '2026-01-16 14:39:39', '2026-01-16 14:39:39'),
(103, 'AIR-696a41a6e6f69', 18, 'provider', 'All providers failed', 'open', '{\"amount\": 100, \"service\": \"airtime\"}', '2026-01-16 14:48:25', '2026-01-16 14:48:25'),
(104, 'AIR-696a41a6e6f69', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 103}', '2026-01-16 14:48:25', '2026-01-16 14:48:25'),
(105, 'AIR-696a41d5c3e1e', 18, 'provider', 'Call to a member function assertAllowed() on null', 'open', '{\"amount\": 100, \"service\": \"airtime\"}', '2026-01-16 14:49:10', '2026-01-16 14:49:10'),
(106, 'AIR-696a41d5c3e1e', 18, 'system', 'Automatic refund after provider failure', 'reversed', '{\"linked_dispute\": 105}', '2026-01-16 14:49:10', '2026-01-16 14:49:10');

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

--
-- Table structure for table `fraud_blacklist`
--

CREATE TABLE `fraud_blacklist` (
  `id` int UNSIGNED NOT NULL,
  `type` enum('email','phone','ip','device','user_id') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `value` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `fraud_logs`
--

CREATE TABLE `fraud_logs` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED NOT NULL,
  `risk_score` int NOT NULL DEFAULT '0',
  `action` enum('allow','step_up_otp','step_up_biometric','block') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'allow',
  `triggered_rules` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `metadata` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `created_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `fraud_logs`
--

INSERT INTO `fraud_logs` (`id`, `user_id`, `risk_score`, `action`, `triggered_rules`, `metadata`, `created_at`) VALUES
(55, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2025-12-29 22:09:25'),
(54, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2025-12-25 15:39:25'),
(53, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2025-12-25 15:38:35'),
(52, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2025-12-25 15:37:55'),
(51, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2025-12-25 15:30:48'),
(56, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-06 20:36:10'),
(57, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-06 20:44:12'),
(58, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-06 21:04:08'),
(59, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-06 21:06:02'),
(60, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-06 21:07:55'),
(61, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-06 21:12:08'),
(62, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-06 21:13:04'),
(63, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-06 21:13:55'),
(64, 72, 40, 'step_up_otp', '[\"rapid_transfers\",\"new_beneficiary\"]', '[]', '2026-01-06 21:14:47'),
(65, 72, 40, 'step_up_otp', '[\"rapid_transfers\",\"new_beneficiary\"]', '[]', '2026-01-06 21:17:52'),
(66, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-06 21:19:33'),
(67, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-06 21:33:41'),
(68, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-06 23:28:41'),
(69, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-06 23:30:06'),
(70, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-08 01:27:24'),
(71, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-08 01:27:24'),
(72, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-08 02:16:31'),
(73, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-08 02:16:31'),
(74, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-16 14:39:35'),
(75, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-16 14:48:22'),
(76, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-16 14:49:09'),
(77, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-16 15:14:29'),
(78, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-16 15:19:18'),
(79, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-17 01:05:20'),
(80, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-17 01:33:18'),
(81, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-17 01:44:49'),
(82, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-17 02:30:36'),
(83, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-17 02:33:03'),
(84, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-17 02:34:42'),
(85, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-17 02:36:20'),
(86, 72, 25, 'step_up_otp', '[\"new_beneficiary\",\"night_time\"]', '[]', '2026-01-27 00:17:46'),
(87, 72, 25, 'step_up_otp', '[\"new_beneficiary\",\"night_time\"]', '[]', '2026-01-27 00:59:05'),
(88, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-27 01:18:52'),
(89, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-27 01:23:07'),
(90, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-27 01:25:23'),
(91, 72, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-01-27 01:32:50'),
(92, 127, 10, 'allow', '[\"new_beneficiary\"]', '[]', '2026-02-20 23:58:22'),
(93, 127, 25, 'step_up_otp', '[\"new_beneficiary\",\"night_time\"]', '[]', '2026-02-21 00:07:42'),
(94, 127, 25, 'step_up_otp', '[\"new_beneficiary\",\"night_time\"]', '[]', '2026-02-21 00:10:48'),
(95, 127, 25, 'step_up_otp', '[\"new_beneficiary\",\"night_time\"]', '[]', '2026-02-21 00:14:01'),
(96, 127, 25, 'step_up_otp', '[\"new_beneficiary\",\"night_time\"]', '[]', '2026-02-21 00:16:41'),
(97, 127, 25, 'step_up_otp', '[\"new_beneficiary\",\"night_time\"]', '[]', '2026-02-21 00:18:08'),
(98, 127, 55, 'step_up_biometric', '[\"rapid_transfers\",\"new_beneficiary\",\"night_time\"]', '[]', '2026-02-21 00:18:47'),
(99, 127, 55, 'step_up_biometric', '[\"rapid_transfers\",\"new_beneficiary\",\"night_time\"]', '[]', '2026-02-21 00:19:19'),
(100, 127, 55, 'step_up_biometric', '[\"rapid_transfers\",\"new_beneficiary\",\"night_time\"]', '[]', '2026-02-21 00:21:42'),
(101, 127, 25, 'step_up_otp', '[\"new_beneficiary\",\"night_time\"]', '[]', '2026-02-21 00:24:27');

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

--
-- Table structure for table `fraud_step_up_challenges`
--

CREATE TABLE `fraud_step_up_challenges` (
  `id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `challenge_id` varchar(64) NOT NULL,
  `action` enum('otp','pin','biometric') NOT NULL,
  `context` varchar(50) NOT NULL,
  `verified` tinyint(1) DEFAULT '0',
  `expires_at` datetime NOT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `verified_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `idempotency_keys`
--

CREATE TABLE `idempotency_keys` (
  `id` bigint NOT NULL,
  `key_value` varchar(64) NOT NULL,
  `response` json DEFAULT NULL,
  `created_at` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `itokens`
--

CREATE TABLE `itokens` (
  `id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `code` varchar(20) NOT NULL,
  `balance` decimal(15,2) NOT NULL,
  `status` enum('active','claimed','expired','destroyed') DEFAULT 'active',
  `issued_by` enum('user','admin','system') DEFAULT 'user',
  `meta` json DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `itokens`
--

INSERT INTO `itokens` (`id`, `user_id`, `code`, `balance`, `status`, `issued_by`, `meta`, `created_at`, `updated_at`) VALUES
(1, 72, 'iTK-930733', 500.00, 'active', 'user', NULL, '2026-01-08 01:27:24', '2026-01-08 01:27:24'),
(2, 72, 'iTK-27E23B', 1000.00, 'claimed', 'user', NULL, '2026-01-08 02:16:31', '2026-01-08 15:10:20');

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

--
-- Table structure for table `itoken_idempotencies`
--

CREATE TABLE `itoken_idempotencies` (
  `id` bigint UNSIGNED NOT NULL,
  `idempotency_key` varchar(120) NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `reference` varchar(50) NOT NULL,
  `status` enum('started','completed','failed') NOT NULL,
  `response` json DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `itoken_idempotencies`
--

INSERT INTO `itoken_idempotencies` (`id`, `idempotency_key`, `user_id`, `reference`, `status`, `response`, `created_at`, `updated_at`) VALUES
(1, 'b7a1a508-5251-48f4-947e-34e074b3c2f0', 72, 'TOK-695ef9ec87b79', 'completed', '{\"code\": \"iTK-930733\", \"status\": true, \"message\": \"Token created successfully\"}', '2026-01-08 01:27:24', '2026-01-08 01:27:24'),
(2, '0be5b73d-2c75-4c7c-9bc2-16ecb18ffb7b', 72, 'TOK-695f056faba3b', 'completed', '{\"code\": \"iTK-27E23B\", \"status\": true, \"message\": \"Token created successfully\"}', '2026-01-08 01:27:24', '2026-01-08 02:16:31');

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

--
-- Table structure for table `itoken_transactions`
--

CREATE TABLE `itoken_transactions` (
  `id` bigint UNSIGNED NOT NULL,
  `token_id` bigint UNSIGNED NOT NULL,
  `action` enum('create','claim','destroy','expire','promo_issue') NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `actor_type` enum('user','admin','system') NOT NULL,
  `actor_id` bigint UNSIGNED DEFAULT NULL,
  `reference` varchar(50) NOT NULL,
  `meta` json DEFAULT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `itoken_transactions`
--

INSERT INTO `itoken_transactions` (`id`, `token_id`, `action`, `amount`, `actor_type`, `actor_id`, `reference`, `meta`, `created_at`) VALUES
(1, 2, 'claim', 1000.00, 'user', 72, 'TKC-695fbaccc4504', NULL, '2026-01-08 15:10:20');

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

--
-- Table structure for table `kyc_businesses`
--

CREATE TABLE `kyc_businesses` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED NOT NULL,
  `rc_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `tin` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `business_address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `director_bvn` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `cac_doc_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `extra_docs_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `tier` int NOT NULL DEFAULT '1',
  `status` enum('pending','verified','rejected') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'pending',
  `failed_attempts` int NOT NULL DEFAULT '0',
  `is_locked` tinyint(1) NOT NULL DEFAULT '0',
  `locked_at` datetime DEFAULT NULL,
  `reason` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `office_address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `business_category` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `business_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `business_profile_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `kyc_customers`
--

CREATE TABLE `kyc_customers` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED NOT NULL,
  `bvn` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `nin` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `state` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `city` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `postal_code` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `gender` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `marital_status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `occupation` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `nin_card_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `id_doc_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `proof_of_address_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `selfie_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `address_verified` tinyint(1) NOT NULL DEFAULT '0',
  `id_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `live_verification` tinyint(1) NOT NULL DEFAULT '0',
  `live_verification_data` json DEFAULT NULL,
  `admin_verified_by` int DEFAULT NULL,
  `admin_verified_at` datetime DEFAULT NULL,
  `tier` int NOT NULL DEFAULT '1',
  `status` enum('pending','verified','rejected') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'pending',
  `failed_attempts` int NOT NULL DEFAULT '0',
  `is_locked` tinyint(1) NOT NULL DEFAULT '0',
  `locked_at` datetime DEFAULT NULL,
  `reason` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `faulty` tinyint(1) NOT NULL DEFAULT '0',
  `kyc_issues` json DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `kyc_customers`
--

INSERT INTO `kyc_customers` (`id`, `user_id`, `bvn`, `nin`, `dob`, `address`, `state`, `city`, `postal_code`, `gender`, `marital_status`, `occupation`, `nin_card_url`, `id_doc_url`, `proof_of_address_url`, `selfie_url`, `address_verified`, `id_type`, `live_verification`, `live_verification_data`, `admin_verified_by`, `admin_verified_at`, `tier`, `status`, `failed_attempts`, `is_locked`, `locked_at`, `reason`, `faulty`, `kyc_issues`, `created_at`, `updated_at`) VALUES
(10, 72, '22400734255', '25061497300', '2000-05-15', 'Ajah Ilaje, Ilesa Town, Osun, 233085', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, NULL, NULL, NULL, 2, 'verified', 0, 0, NULL, NULL, 0, NULL, '2025-12-20 10:14:13', '2025-12-20 10:49:48'),
(30, 127, '22400734257', '25061497308', '1994-02-10', 'Ajah Lagos', 'Osun', 'Ilesa', '101001', 'Male', 'Single', 'Software Engineer ', 'https://res.cloudinary.com/prudentcore/image/upload/v1770562902/aknapay/kyc/scaled_1006951541_1770562901.jpg', 'https://res.cloudinary.com/prudentcore/image/upload/v1770562903/aknapay/kyc/scaled_1006953508_1770562903.jpg', NULL, NULL, 0, NULL, 0, NULL, 143, '2026-03-02 03:46:38', 2, 'pending', 0, 0, NULL, NULL, 0, NULL, '2026-01-26 12:40:26', '2026-03-02 03:46:38');

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

--
-- Table structure for table `live_kyc_sessions`
--

CREATE TABLE `live_kyc_sessions` (
  `id` bigint UNSIGNED NOT NULL,
  `user_id` int UNSIGNED NOT NULL,
  `reference_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('pending','completed','failed','expired') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `provider` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'dojah',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `migrations` (
  `id` bigint UNSIGNED NOT NULL,
  `version` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `group` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `namespace` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `time` int NOT NULL,
  `batch` int UNSIGNED NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `migrations` (`id`, `version`, `class`, `group`, `namespace`, `time`, `batch`) VALUES
(1, '2025-12-19-133913', 'App\\Database\\Migrations\\CreateProvidersTable', 'default', 'App', 1766151677, 1),
(2, '2025-12-19-133930', 'App\\Database\\Migrations\\CreateProviderServicesTable', 'default', 'App', 1766151677, 1),
(3, '2025-12-19-133947', 'App\\Database\\Migrations\\CreateBillRequestsTable', 'default', 'App', 1766151677, 1),
(4, '2025-12-19-133959', 'App\\Database\\Migrations\\CreateBillFulfillmentsTable', 'default', 'App', 1766151677, 1),
(5, '2025-12-19-134011', 'App\\Database\\Migrations\\CreateProviderReportsTable', 'default', 'App', 1766151677, 1);

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

--
-- Table structure for table `provider_reports`
--

CREATE TABLE `provider_reports` (
  `id` bigint UNSIGNED NOT NULL,
  `provider_id` int UNSIGNED NOT NULL,
  `report_date` date NOT NULL,
  `raw_data` json NOT NULL,
  `processed` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `provider_transactions`
--

CREATE TABLE `provider_transactions` (
  `id` bigint NOT NULL,
  `provider_wallet_id` int DEFAULT NULL,
  `reference` varchar(64) DEFAULT NULL,
  `type` enum('debit','credit') DEFAULT NULL,
  `amount` decimal(12,2) DEFAULT NULL,
  `status` enum('pending','completed','disputed') DEFAULT NULL,
  `provider_reference` varchar(64) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `provider_wallets`
--

CREATE TABLE `provider_wallets` (
  `id` int NOT NULL,
  `provider_code` varchar(50) DEFAULT NULL,
  `balance` decimal(12,2) DEFAULT '0.00',
  `last_reconciled_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `provider_webhooks`
--

CREATE TABLE `provider_webhooks` (
  `id` bigint UNSIGNED NOT NULL,
  `provider` varchar(50) NOT NULL,
  `event` varchar(100) NOT NULL,
  `reference` varchar(100) DEFAULT NULL,
  `payload` json NOT NULL,
  `processed` tinyint(1) DEFAULT '0',
  `processed_at` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `referrals`
--

CREATE TABLE `referrals` (
  `id` bigint UNSIGNED NOT NULL,
  `inviter_user_id` int UNSIGNED NOT NULL,
  `invited_user_id` int UNSIGNED NOT NULL,
  `referral_code` varchar(20) COLLATE utf8mb4_general_ci NOT NULL,
  `status` enum('pending','completed','rewarded') COLLATE utf8mb4_general_ci DEFAULT 'pending',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `referrals`
--

INSERT INTO `referrals` (`id`, `inviter_user_id`, `invited_user_id`, `referral_code`, `status`, `created_at`, `updated_at`) VALUES
(2, 72, 127, 'ILAJED', 'completed', '2026-01-26 12:40:28', '2026-01-26 12:55:36');

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

--
-- Table structure for table `registration_idempotency`
--

CREATE TABLE `registration_idempotency` (
  `id` bigint UNSIGNED NOT NULL,
  `idempotency_key` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `request_hash` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `status` enum('processing','completed','failed') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'processing',
  `response` json DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `registration_idempotency`
--

INSERT INTO `registration_idempotency` (`id`, `idempotency_key`, `request_hash`, `user_id`, `status`, `response`, `created_at`, `updated_at`) VALUES
(65, '335e02c9-c817-408f-ad93-9ceb1f8e15bb-014', 'dd00d5532c92bfc4d6b50190f8f46f6f50bb43150fa011e430436470ea4e3ed7', NULL, 'failed', NULL, '2026-02-23 12:56:10', '2026-02-23 12:56:12'),
(66, '335e02c9-c817-408f-ad93-9ceb1f8e15bb', 'dd00d5532c92bfc4d6b50190f8f46f6f50bb43150fa011e430436470ea4e3ed7', 140, 'completed', '{\"tier\": 1, \"user_id\": 140}', '2026-02-23 12:59:28', '2026-02-23 12:59:32'),
(64, '335e02c9-c817-408f-ad93-9ceb1f8e15bb-0a6', 'dd00d5532c92bfc4d6b50190f8f46f6f50bb43150fa011e430436470ea4e3ed7', NULL, 'failed', NULL, '2026-02-23 12:54:12', '2026-02-23 12:54:13');

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

--
-- Table structure for table `settings`
--

CREATE TABLE `settings` (
  `id` int NOT NULL,
  `class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `type` varchar(31) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'string',
  `context` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `tier_limit_logs`
--

CREATE TABLE `tier_limit_logs` (
  `id` bigint NOT NULL,
  `user_id` int NOT NULL,
  `date` date NOT NULL,
  `inbound_amount` decimal(15,2) NOT NULL DEFAULT '0.00',
  `outbound_amount` decimal(15,2) NOT NULL DEFAULT '0.00',
  `inbound_count` int NOT NULL DEFAULT '0',
  `outbound_count` int NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `trusted_devices`
--

CREATE TABLE `trusted_devices` (
  `id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `device_fingerprint` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `device_name` varchar(64) NOT NULL,
  `platform` varchar(32) NOT NULL,
  `os_version` varchar(32) DEFAULT NULL,
  `app_version` varchar(32) DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `last_seen_at` datetime NOT NULL,
  `is_trusted` tinyint(1) DEFAULT '0',
  `is_current` tinyint(1) DEFAULT '0',
  `trusted_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `trusted_devices`
--

INSERT INTO `trusted_devices` (`id`, `user_id`, `device_fingerprint`, `device_name`, `platform`, `os_version`, `app_version`, `ip_address`, `last_seen_at`, `is_trusted`, `is_current`, `trusted_at`, `created_at`, `updated_at`) VALUES
(4, 72, '4ba4e4b9593236ec24c410156cce2477ccb072784cbf2e4958c918b9c4c9c71d', 'Gege', 'android', '16', '1.0.0', '197.211.52.67', '2026-02-01 02:39:36', 1, 1, '2026-01-06 22:56:26', '2026-01-06 22:54:11', '2026-02-01 02:39:36'),
(5, 121, '4ba4e4b9593236ec24c410156cce2477ccb072784cbf2e4958c918b9c4c9c71d', 'Unknown Device', 'android', '16', '1.0.0', '197.211.52.65', '2026-01-26 00:01:49', 1, 1, NULL, '2026-01-26 00:01:49', '2026-01-26 00:01:49'),
(6, 122, '4ba4e4b9593236ec24c410156cce2477ccb072784cbf2e4958c918b9c4c9c71d', 'Unknown Device', 'android', '16', '1.0.0', '197.211.52.65', '2026-01-26 00:31:57', 1, 1, NULL, '2026-01-26 00:13:11', '2026-01-26 00:31:57'),
(7, 124, '4ba4e4b9593236ec24c410156cce2477ccb072784cbf2e4958c918b9c4c9c71d', 'Unknown Device', 'android', '16', '1.0.0', '197.211.53.107', '2026-01-26 11:22:56', 1, 1, NULL, '2026-01-26 11:22:56', '2026-01-26 11:22:56'),
(8, 125, '4ba4e4b9593236ec24c410156cce2477ccb072784cbf2e4958c918b9c4c9c71d', 'Unknown Device', 'android', '16', '1.0.0', '197.211.53.107', '2026-01-26 11:37:21', 1, 1, NULL, '2026-01-26 11:37:21', '2026-01-26 11:37:21'),
(9, 126, '4ba4e4b9593236ec24c410156cce2477ccb072784cbf2e4958c918b9c4c9c71d', 'Unknown Device', 'android', '16', '1.0.0', '197.211.53.107', '2026-01-26 11:48:47', 1, 1, NULL, '2026-01-26 11:48:47', '2026-01-26 11:48:47'),
(10, 127, '4ba4e4b9593236ec24c410156cce2477ccb072784cbf2e4958c918b9c4c9c71d', 'Unknown Device', 'android', '16', '1.0.0', '197.211.53.107', '2026-02-23 14:59:31', 1, 1, NULL, '2026-01-26 12:40:28', '2026-02-23 14:59:31'),
(12, 140, '4ba4e4b9593236ec24c410156cce2477ccb072784cbf2e4958c918b9c4c9c71d', 'Unknown Device', 'android', '16', '1.0.0', '197.211.53.97', '2026-02-23 13:00:09', 1, 1, NULL, '2026-02-23 12:59:30', '2026-02-23 13:00:09');

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

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

CREATE TABLE `users` (
  `id` int UNSIGNED NOT NULL,
  `username` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `user_type` enum('customer','business','admin','staff') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'customer',
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status_message` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `last_active` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `referral_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `blocked_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `users` (`id`, `username`, `user_type`, `status`, `status_message`, `active`, `last_active`, `created_at`, `updated_at`, `deleted_at`, `referral_code`, `blocked_at`) VALUES
(72, 'ilajedev@gmail.com', 'customer', 'active', 'Welcome To AknaPay', 1, '2026-02-04 03:51:54', '2025-12-20 10:14:04', '2026-01-23 15:55:00', NULL, 'ILAJED', NULL),
(127, 'ohunayogege', 'customer', 'active', 'Welcome to AknaPay', 1, '2026-02-23 15:54:43', '2026-01-26 12:40:25', '2026-01-26 12:55:36', NULL, '3JCF49', NULL),
(143, 'super_admin', 'admin', 'active', 'Super admin created from seeding', 1, NULL, '2026-02-24 23:18:45', '2026-03-11 14:03:57', NULL, NULL, NULL);

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

--
-- Table structure for table `user_notifications`
--

CREATE TABLE `user_notifications` (
  `id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `title` varchar(255) NOT NULL,
  `body` text NOT NULL,
  `data` json DEFAULT NULL,
  `is_read` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `user_notifications`
--

INSERT INTO `user_notifications` (`id`, `user_id`, `title`, `body`, `data`, `is_read`, `created_at`) VALUES
(1, 72, '₦100.00 sent', 'Transfer to Ohunayo Gege was successful.', '{\"type\": \"wallet_transfer_out\", \"reference\": \"W2W-29b3c5664ce2\"}', 1, '2026-01-27 00:24:29'),
(2, 72, '₦100.00 sent', 'Transfer to Ohunayo Gege was successful.', '{\"type\": \"wallet_transfer_out\", \"reference\": \"W2W-0470854c6927\"}', 1, '2026-01-27 00:26:26'),
(3, 127, '₦100.00 received', 'AknaPay/Ohunayo Gege sent you ₦100.00.', '{\"type\": \"wallet_transfer_in\", \"reference\": \"W2W-0470854c6927\"}', 1, '2026-01-27 00:26:30'),
(4, 72, '₦100.00 sent', 'Transfer to Ohunayo Gege was successful.', '{\"type\": \"wallet_transfer_out\", \"reference\": \"W2W-380425186e5a\"}', 1, '2026-01-27 01:00:06'),
(5, 127, '₦100.00 received', 'AknaPay/Ohunayo Gege sent you ₦100.00.', '{\"type\": \"wallet_transfer_in\", \"reference\": \"W2W-380425186e5a\"}', 1, '2026-01-27 01:00:06'),
(6, 72, '₦100.00 sent', 'Transfer to Ohunayo Gege was successful.', '{\"type\": \"wallet_transfer_out\", \"reference\": \"W2W-30de1346c915\"}', 1, '2026-01-27 01:20:22'),
(7, 127, '₦100.00 received', 'AknaPay/Ohunayo Gege sent you ₦100.00.', '{\"type\": \"wallet_transfer_in\", \"reference\": \"W2W-30de1346c915\"}', 1, '2026-01-27 01:20:23'),
(8, 72, '₦100.00 sent', 'Transfer to Ohunayo Gege was successful.', '{\"type\": \"wallet_transfer_out\", \"reference\": \"W2W-b9d4a624577f\"}', 1, '2026-01-27 01:24:03'),
(9, 127, '₦100.00 received', 'AknaPay/Ohunayo Gege sent you ₦100.00.', '{\"type\": \"wallet_transfer_in\", \"reference\": \"W2W-b9d4a624577f\"}', 1, '2026-01-27 01:24:03'),
(10, 72, '₦100.00 sent', 'Transfer to Ohunayo Gege was successful.', '{\"type\": \"wallet_transfer_out\", \"reference\": \"W2W-4457e6c8e048\"}', 1, '2026-01-27 01:31:25'),
(11, 127, '₦100.00 received', 'AknaPay/Ohunayo Gege sent you ₦100.00.', '{\"type\": \"wallet_transfer_in\", \"reference\": \"W2W-4457e6c8e048\"}', 1, '2026-01-27 01:31:25'),
(12, 72, '₦1,000.00 sent', 'Transfer to Ohunayo Gege was successful.', '{\"type\": \"wallet_transfer_out\", \"reference\": \"W2W-3ebc2258be93\"}', 1, '2026-01-27 01:32:51'),
(13, 127, '₦1,000.00 received', 'AknaPay/Ohunayo Gege sent you ₦1,000.00.', '{\"type\": \"wallet_transfer_in\", \"reference\": \"W2W-3ebc2258be93\"}', 1, '2026-01-27 01:32:52'),
(14, 72, 'Transfer sent', '₦5,000.00 transfer to Ohunayo Gege was successful.', '{\"type\": \"wallet_transfer_out\", \"reference\": \"W2W-2da0b1f8b645\"}', 1, '2026-01-27 02:25:38'),
(15, 127, '₦5,000.00 transfer received', 'AknaPay/Ohunayo Gege sent you ₦5,000.00.', '{\"type\": \"wallet_transfer_in\", \"reference\": \"W2W-2da0b1f8b645\"}', 1, '2026-01-27 02:25:38'),
(16, 72, 'Transfer sent', '₦5,000.00 transfer to Ohunayo Gege was successful.', '{\"type\": \"wallet_transfer_out\", \"reference\": \"W2W-37e4c3529f4b\"}', 1, '2026-01-27 02:38:54'),
(17, 127, '₦5,000.00 transfer received', 'AknaPay/Ohunayo Gege sent you ₦5,000.00.', '{\"type\": \"wallet_transfer_in\", \"reference\": \"W2W-37e4c3529f4b\"}', 1, '2026-01-27 02:38:55'),
(18, 72, 'Transfer sent', '₦10,000.00 transfer to Ohunayo Gege was successful.', '{\"type\": \"wallet_transfer_out\", \"reference\": \"W2W-c92a49ebc09c\"}', 1, '2026-01-27 02:41:40'),
(19, 127, '₦10,000.00 transfer received', 'AknaPay/Ohunayo Gege sent you ₦10,000.00.', '{\"type\": \"wallet_transfer_in\", \"reference\": \"W2W-c92a49ebc09c\"}', 1, '2026-01-27 02:41:41'),
(20, 72, 'Transfer sent', '₦50,000.00 transfer to Ohunayo Gege was successful.', '{\"type\": \"wallet_transfer_out\", \"reference\": \"W2W-df86b4c84bbc\"}', 1, '2026-01-27 02:49:19'),
(21, 127, '₦50,000.00 transfer received', 'AknaPay/Ohunayo Gege sent you ₦50,000.00.', '{\"type\": \"wallet_transfer_in\", \"reference\": \"W2W-df86b4c84bbc\"}', 1, '2026-01-27 02:49:19'),
(22, 72, 'Transfer sent', '₦10,000.00 transfer to Ohunayo Gege was successful.', '{\"type\": \"wallet_transfer_out\", \"reference\": \"W2W-310a4e6f9ed2\"}', 1, '2026-01-27 03:10:21'),
(23, 127, '₦10,000.00 transfer received', 'AknaPay/Ohunayo Gege sent you ₦10,000.00.', '{\"type\": \"wallet_transfer_in\", \"reference\": \"W2W-310a4e6f9ed2\"}', 1, '2026-01-27 03:10:23'),
(27, 127, 'Bank transfer failed', '₦5,000.00 transfer to OHUNAYO  GEGE failed and has been reversed.', '{\"type\": \"bank_transfer_failed\", \"reason\": \"Insufficient Funds. You need a total of 5,025.00 ngn to process this transaction\", \"reference\": \"B2B-872bf4835128\"}', 1, '2026-01-29 02:33:46'),
(28, 127, 'Bank transfer failed', '₦9,000.00 transfer to OHUNAYO  GEGE failed and has been reversed.', '{\"type\": \"bank_transfer_failed\", \"reason\": \"Insufficient Funds. You need a total of 9,045.00 ngn to process this transaction\", \"reference\": \"B2B-bf9ac0afa7cd\"}', 1, '2026-01-29 02:47:04'),
(29, 127, 'Bank transfer failed', '₦50,000.00 transfer to OHUNAYO  GEGE failed and has been reversed.', '{\"type\": \"bank_transfer_failed\", \"reason\": \"Insufficient Funds. You need a total of 50,250.00 ngn to process this transaction\", \"reference\": \"B2B-872bf4835128\"}', 1, '2026-01-29 03:10:26'),
(30, 127, 'Transfer sent', '₦10,000.00 transfer to AknaPay/Ohunayo Gege was successful.', '{\"type\": \"wallet_transfer_out\", \"reference\": \"W2W-c2f2f51b7d31\"}', 1, '2026-01-31 01:48:42'),
(31, 72, '₦10,000.00 transfer received', 'Ohunayo Gege sent you ₦10,000.00.', '{\"type\": \"wallet_transfer_in\", \"reference\": \"W2W-c2f2f51b7d31\"}', 1, '2026-01-31 01:48:42');

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

--
-- Table structure for table `user_otps`
--

CREATE TABLE `user_otps` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED NOT NULL,
  `code` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `type` enum('email_verification','password_reset') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `expires_at` datetime NOT NULL,
  `consumed` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0 = unused, 1 = consumed',
  `created_at` datetime NOT NULL DEFAULT '2025-12-05 02:27:39',
  `updated_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `user_otps`
--

INSERT INTO `user_otps` (`id`, `user_id`, `code`, `type`, `expires_at`, `consumed`, `created_at`, `updated_at`) VALUES
(44, 143, '4e3ac3', 'email_verification', '2026-03-12 14:20:43', 0, '2026-03-11 14:20:43', NULL);

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

--
-- Table structure for table `velocity_events`
--

CREATE TABLE `velocity_events` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED NOT NULL,
  `event_type` enum('transfer','login','otp','withdrawal') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `velocity_events`
--

INSERT INTO `velocity_events` (`id`, `user_id`, `event_type`, `created_at`) VALUES
(66, 72, 'transfer', '2025-12-29 22:09:25'),
(65, 72, 'transfer', '2025-12-25 15:39:25'),
(64, 72, 'transfer', '2025-12-25 15:38:35'),
(63, 72, 'transfer', '2025-12-25 15:37:55'),
(62, 72, 'transfer', '2025-12-25 15:30:48'),
(67, 72, 'transfer', '2026-01-06 20:36:10'),
(68, 72, 'transfer', '2026-01-06 20:44:12'),
(69, 72, 'transfer', '2026-01-06 21:04:08'),
(70, 72, 'transfer', '2026-01-06 21:06:02'),
(71, 72, 'transfer', '2026-01-06 21:07:55'),
(72, 72, 'transfer', '2026-01-06 21:12:08'),
(73, 72, 'transfer', '2026-01-06 21:13:04'),
(74, 72, 'transfer', '2026-01-06 21:13:55'),
(75, 72, 'transfer', '2026-01-06 21:14:47'),
(76, 72, 'transfer', '2026-01-06 21:17:52'),
(77, 72, 'transfer', '2026-01-06 21:19:33'),
(78, 72, 'transfer', '2026-01-06 21:33:41'),
(79, 72, 'transfer', '2026-01-06 23:28:41'),
(80, 72, 'transfer', '2026-01-06 23:30:06'),
(81, 72, 'transfer', '2026-01-08 01:27:24'),
(82, 72, 'transfer', '2026-01-08 01:27:24'),
(83, 72, 'transfer', '2026-01-08 02:16:31'),
(84, 72, 'transfer', '2026-01-08 02:16:31'),
(85, 72, 'transfer', '2026-01-16 14:39:35'),
(86, 72, 'transfer', '2026-01-16 14:48:22'),
(87, 72, 'transfer', '2026-01-16 14:49:09'),
(88, 72, 'transfer', '2026-01-16 15:14:29'),
(89, 72, 'transfer', '2026-01-16 15:19:18'),
(90, 72, 'transfer', '2026-01-17 01:05:20'),
(91, 72, 'transfer', '2026-01-17 01:33:18'),
(92, 72, 'transfer', '2026-01-17 01:44:49'),
(93, 72, 'transfer', '2026-01-17 02:30:36'),
(94, 72, 'transfer', '2026-01-17 02:33:03'),
(95, 72, 'transfer', '2026-01-17 02:34:42'),
(96, 72, 'transfer', '2026-01-17 02:36:20'),
(97, 72, 'transfer', '2026-01-27 00:17:46'),
(98, 72, 'transfer', '2026-01-27 00:59:04'),
(99, 72, 'transfer', '2026-01-27 01:18:52'),
(100, 72, 'transfer', '2026-01-27 01:23:07'),
(101, 72, 'transfer', '2026-01-27 01:25:23'),
(102, 72, 'transfer', '2026-01-27 01:32:50'),
(103, 127, 'transfer', '2026-02-20 23:58:22'),
(104, 127, 'transfer', '2026-02-21 00:07:42'),
(105, 127, 'transfer', '2026-02-21 00:10:48'),
(106, 127, 'transfer', '2026-02-21 00:14:01'),
(107, 127, 'transfer', '2026-02-21 00:16:41'),
(108, 127, 'transfer', '2026-02-21 00:18:08'),
(109, 127, 'transfer', '2026-02-21 00:18:47'),
(110, 127, 'transfer', '2026-02-21 00:19:19'),
(111, 127, 'transfer', '2026-02-21 00:21:42'),
(112, 127, 'transfer', '2026-02-21 00:24:27');

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

--
-- Table structure for table `wallets`
--

CREATE TABLE `wallets` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `wallet_id` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `currency` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'NGN',
  `virtual_account_number` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `account_name` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `bank_name` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `bank_code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `customer_identifier` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `beneficiary_account` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `available_balance` decimal(15,2) NOT NULL DEFAULT '0.00',
  `ledger_balance` decimal(15,2) NOT NULL DEFAULT '0.00',
  `reward_balance` decimal(18,2) NOT NULL DEFAULT '0.00',
  `tier_level` int NOT NULL DEFAULT '1',
  `account_role` enum('platform','user','general') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'user',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `wallets`
--

INSERT INTO `wallets` (`id`, `user_id`, `wallet_id`, `currency`, `virtual_account_number`, `account_name`, `bank_name`, `bank_code`, `customer_identifier`, `beneficiary_account`, `available_balance`, `ledger_balance`, `reward_balance`, `tier_level`, `account_role`, `created_at`, `updated_at`) VALUES
(1, NULL, NULL, 'NGN', '0000000000', 'Platform Fee Wallet', 'AknaPay', '000', 'AknaPay', '0000000000', 0.00, 0.00, 0.00, 99, 'platform', '2025-12-21 23:57:05', '2025-12-21 23:57:05'),
(18, 72, '', 'NGN', '0800379373', 'AknaPay/Ohunayo Gege', 'GTBank', '008', NULL, NULL, 19472000.65, 19472000.65, 2000.00, 2, 'user', '2025-12-20 10:14:10', '2026-02-01 03:05:04'),
(60, 127, NULL, 'NGN', '5300229818', 'Ohunayo Gege', '9psb', '000', 'ae5969c6-9c0b-45ed-b273-4a3b119c6e55', NULL, 71007419082.23, 71007419082.23, 0.00, 2, 'user', '2026-01-26 12:40:27', '2026-02-08 16:01:45'),
(61, 72, NULL, 'USD', NULL, 'Samson Gege', NULL, '000', NULL, NULL, 6751790.00, 6751790.00, 0.00, 2, 'user', '2026-01-26 12:40:27', '2026-02-01 03:05:04'),
(62, 127, NULL, 'USD', NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, 0.00, 2, 'user', '2026-02-20 23:58:21', '2026-02-20 23:58:21'),
(64, 140, NULL, 'NGN', '5300170305', 'OHUNAYO GEGE', '9psb', '000', '020e5764-d4ae-4a77-aa5b-4d2fcac43d88', NULL, 0.00, 0.00, 0.00, 1, 'user', '2026-02-23 12:59:30', '2026-02-23 12:59:30');

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

--
-- Table structure for table `wallet_daily_stats`
--

CREATE TABLE `wallet_daily_stats` (
  `id` int NOT NULL,
  `wallet_id` int NOT NULL,
  `stat_date` date NOT NULL,
  `inbound_total` decimal(10,0) NOT NULL DEFAULT '0',
  `outbound_total` decimal(10,0) NOT NULL DEFAULT '0',
  `inbound_count` int NOT NULL DEFAULT '0',
  `outbound_count` int NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `wallet_daily_stats`
--

INSERT INTO `wallet_daily_stats` (`id`, `wallet_id`, `stat_date`, `inbound_total`, `outbound_total`, `inbound_count`, `outbound_count`, `created_at`) VALUES
(5, 18, '2025-12-25', 0, 200, 0, 2, '2026-01-08 01:27:24'),
(6, 18, '2025-12-29', 0, 1500, 0, 1, '2026-01-08 01:27:24'),
(7, 18, '2026-01-06', 0, 1200, 0, 12, '2026-01-08 01:27:24'),
(8, 18, '2026-01-08', 0, 1500, 0, 2, '2026-01-08 01:27:24'),
(9, 18, '2026-01-16', 0, 500, 0, 5, '2026-01-08 01:27:24'),
(10, 18, '2026-01-17', 0, 1200, 0, 7, '2026-01-08 01:27:24'),
(11, 18, '2026-01-27', 0, 1500, 0, 6, '2026-01-08 01:27:24');

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

--
-- Table structure for table `wallet_ledgers`
--

CREATE TABLE `wallet_ledgers` (
  `id` bigint UNSIGNED NOT NULL,
  `wallet_id` bigint UNSIGNED NOT NULL,
  `direction` enum('debit','credit') NOT NULL,
  `account_role` varchar(50) NOT NULL,
  `type` varchar(50) NOT NULL,
  `operation_type` varchar(50) NOT NULL,
  `channel` varchar(30) NOT NULL,
  `amount` decimal(18,2) NOT NULL,
  `reference` varchar(100) NOT NULL,
  `contra_wallet_id` bigint UNSIGNED DEFAULT NULL,
  `status` enum('pending','successful','failed','reversed') NOT NULL,
  `meta` json DEFAULT NULL,
  `idempotency_key` varchar(100) NOT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `wallet_ledgers`
--

INSERT INTO `wallet_ledgers` (`id`, `wallet_id`, `direction`, `account_role`, `type`, `operation_type`, `channel`, `amount`, `reference`, `contra_wallet_id`, `status`, `meta`, `idempotency_key`, `created_at`) VALUES
(7, 18, 'debit', 'USER_WALLET', 'wallet_transfer', 'wallet_transfer_out', 'wallet', 10000.00, 'W2W-c92a49ebc09c', 60, 'successful', '{\"to\": {\"bank_name\": \"9psb\", \"account_name\": \"Ohunayo Gege\", \"account_number\": \"5300229818\"}, \"from\": {\"bank_name\": \"GTBank\", \"account_name\": \"AknaPay/Ohunayo Gege\", \"account_number\": \"0800379373\"}, \"narration\": \"TRF TO OHUNAYO GEGE\", \"to_user_id\": 127}', '715a3bd5-74a5-49e5-91d3-176c21c2138f', '2026-01-27 02:41:40'),
(8, 60, 'credit', 'USER_WALLET', 'wallet_transfer', 'wallet_transfer_in', 'wallet', 10000.00, 'W2W-c92a49ebc09c', 18, 'successful', '{\"to\": {\"bank_name\": \"9psb\", \"account_name\": \"Ohunayo Gege\", \"account_number\": \"5300229818\"}, \"from\": {\"bank_name\": \"GTBank\", \"account_name\": \"AknaPay/Ohunayo Gege\", \"account_number\": \"0800379373\"}, \"narration\": \"TRF FR IG - W2W-c92a49ebc09c\", \"from_user_id\": \"72\"}', '715a3bd5-74a5-49e5-91d3-176c21c2138f-cr', '2026-01-27 02:41:40'),
(9, 18, 'debit', 'USER_WALLET', 'wallet_transfer', 'wallet_transfer_out', 'wallet', 50000.00, 'W2W-df86b4c84bbc', 60, 'successful', '{\"to\": {\"bank_name\": \"9psb\", \"account_name\": \"Ohunayo Gege\", \"account_number\": \"5300229818\"}, \"from\": {\"bank_name\": \"GTBank\", \"account_name\": \"AknaPay/Ohunayo Gege\", \"account_number\": \"0800379373\"}, \"narration\": \"TRF TO OHUNAYO GEGE\", \"to_user_id\": 127}', 'fa150030-9656-4d66-a4be-18c3a9630729', '2026-01-27 02:49:18'),
(10, 60, 'credit', 'USER_WALLET', 'wallet_transfer', 'wallet_transfer_in', 'wallet', 50000.00, 'W2W-df86b4c84bbc', 18, 'successful', '{\"to\": {\"bank_name\": \"9psb\", \"account_name\": \"Ohunayo Gege\", \"account_number\": \"5300229818\"}, \"from\": {\"bank_name\": \"GTBank\", \"account_name\": \"AknaPay/Ohunayo Gege\", \"account_number\": \"0800379373\"}, \"narration\": \"TRF FR IG - W2W-df86b4c84bbc\", \"from_user_id\": \"72\"}', 'fa150030-9656-4d66-a4be-18c3a9630729-cr', '2026-01-27 02:49:18'),
(11, 18, 'debit', 'USER_WALLET', 'wallet_transfer', 'wallet_transfer_out', 'wallet', 10000.00, 'W2W-310a4e6f9ed2', 60, 'successful', '{\"to\": {\"bank_name\": \"9psb\", \"account_name\": \"Ohunayo Gege\", \"account_number\": \"5300229818\"}, \"from\": {\"bank_name\": \"GTBank\", \"account_name\": \"AknaPay/Ohunayo Gege\", \"account_number\": \"0800379373\"}, \"narration\": \"TRF TO OHUNAYO GEGE\", \"to_user_id\": 127}', 'aa48d3ea-dd29-4d3b-9086-0a67e98899bf', '2026-01-27 03:10:20'),
(12, 60, 'credit', 'USER_WALLET', 'wallet_transfer', 'wallet_transfer_in', 'wallet', 10000.00, 'W2W-310a4e6f9ed2', 18, 'successful', '{\"to\": {\"bank_name\": \"9psb\", \"account_name\": \"Ohunayo Gege\", \"account_number\": \"5300229818\"}, \"from\": {\"bank_name\": \"GTBank\", \"account_name\": \"AknaPay/Ohunayo Gege\", \"account_number\": \"0800379373\"}, \"narration\": \"TRF FR IG - W2W-310a4e6f9ed2\", \"from_user_id\": \"72\"}', 'aa48d3ea-dd29-4d3b-9086-0a67e98899bf-cr', '2026-01-27 03:10:20'),
(65, 60, 'debit', 'USER_WALLET', 'bank_transfer', 'bank_transfer_out', 'bank', 50000.00, 'B2B-872bf4835128', 2, 'failed', '{\"bank\": {\"bank_code\": \"100004\", \"bank_name\": \"OPAY\", \"account_name\": \"OHUNAYO  GEGE\", \"account_number\": \"8149983395\"}, \"fees\": {\"cashback\": 0, \"total_fee\": 75, \"stamp_duty\": 50, \"transfer_fee\": 25}, \"narration\": \"TRF TO OHUNAYO  GEGE\"}', 'f848794a-2cce-4da1-a94d-6286dce04294:user-debit', '2026-01-29 03:10:24'),
(66, 2, 'credit', 'PLATFORM_WALLET', 'bank_transfer', 'bank_transfer_in', 'bank', 50000.00, 'B2B-872bf4835128', 60, 'failed', '{\"from_user_id\": \"127\"}', 'f848794a-2cce-4da1-a94d-6286dce04294:settlement-credit', '2026-01-29 03:10:24'),
(67, 60, 'debit', 'USER_WALLET', 'fee_charge', 'fee_charge', 'system', 25.00, 'B2B-872bf4835128-TF', 1, 'successful', '{\"fee_type\": \"transfer_fee\"}', 'f848794a-2cce-4da1-a94d-6286dce04294:fee-debit', '2026-01-29 03:10:24'),
(68, 1, 'credit', 'PLATFORM_WALLET', 'fee_charge', 'fee_income', 'system', 25.00, 'B2B-872bf4835128-TF', 60, 'successful', '{\"fee_type\": \"transfer_fee\"}', 'f848794a-2cce-4da1-a94d-6286dce04294:fee-credit', '2026-01-29 03:10:24'),
(69, 60, 'debit', 'USER_WALLET', 'stamp_duty', 'stamp_duty', 'system', 50.00, 'B2B-872bf4835128-SD', 3, 'successful', '{\"fee_type\": \"stamp_duty\"}', 'f848794a-2cce-4da1-a94d-6286dce04294:stamp-debit', '2026-01-29 03:10:24'),
(70, 3, 'credit', 'GOVERNMENT_HOLDING', 'stamp_duty', 'stamp_duty_hold', 'system', 50.00, 'B2B-872bf4835128-SD', 60, 'successful', '{\"source\": \"bank_transfer\"}', 'f848794a-2cce-4da1-a94d-6286dce04294:stamp-credit', '2026-01-29 03:10:24'),
(71, 60, 'credit', 'USER_WALLET', 'reversal', 'bank_transfer_reversal', 'system', 50075.00, 'B2B-872bf4835128-RV', NULL, 'successful', '{\"reason\": \"Insufficient Funds. You need a total of 50,250.00 ngn to process this transaction\", \"original_reference\": \"B2B-872bf4835128\"}', 'rv-697ac1921d62b3.13871155', '2026-01-29 03:10:26'),
(72, 60, 'debit', 'USER_WALLET', 'wallet_transfer', 'wallet_transfer_out', 'wallet', 10000.00, 'W2W-c2f2f51b7d31', 18, 'successful', '{\"to\": {\"bank_name\": \"GTBank\", \"account_name\": \"AknaPay/Ohunayo Gege\", \"account_number\": \"0800379373\"}, \"from\": {\"bank_name\": \"9psb\", \"account_name\": \"Ohunayo Gege\", \"account_number\": \"5300229818\"}, \"narration\": \"TRF TO IG - W2W-c2f2f51b7d31\", \"to_user_id\": 72}', 'a12812a9-27f4-4cd1-bb22-a7e71da169da', '2026-03-11 01:48:41'),
(73, 18, 'credit', 'USER_WALLET', 'wallet_transfer', 'wallet_transfer_in', 'wallet', 10000.00, 'W2W-c2f2f51b7d31', 60, 'successful', '{\"to\": {\"bank_name\": \"GTBank\", \"account_name\": \"AknaPay/Ohunayo Gege\", \"account_number\": \"0800379373\"}, \"from\": {\"bank_name\": \"9psb\", \"account_name\": \"Ohunayo Gege\", \"account_number\": \"5300229818\"}, \"narration\": \"TRF FR OHUNAYO GEGE\", \"from_user_id\": \"127\"}', 'a12812a9-27f4-4cd1-bb22-a7e71da169da-cr', '2026-02-27 01:48:41');

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

--
-- Table structure for table `wallet_limits`
--

CREATE TABLE `wallet_limits` (
  `id` int UNSIGNED NOT NULL,
  `wallet_id` int UNSIGNED NOT NULL,
  `inbound_total_limit` decimal(15,2) NOT NULL DEFAULT '50000.00',
  `outbound_total_limit` decimal(15,2) NOT NULL DEFAULT '3000.00',
  `bill_payment_limit` decimal(15,2) NOT NULL DEFAULT '20000.00',
  `inbound_count_limit` int NOT NULL DEFAULT '5',
  `outbound_count_limit` int NOT NULL DEFAULT '3',
  `can_have_virtual_card` tinyint(1) NOT NULL DEFAULT '0',
  `can_fx` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `wallet_limits`
--

INSERT INTO `wallet_limits` (`id`, `wallet_id`, `inbound_total_limit`, `outbound_total_limit`, `bill_payment_limit`, `inbound_count_limit`, `outbound_count_limit`, `can_have_virtual_card`, `can_fx`, `created_at`, `updated_at`) VALUES
(15, 18, 1000000.00, 1000000.00, 200000.00, 20, 100, 1, 0, '2025-12-20 10:14:10', '2025-12-20 10:49:49'),
(61, 64, 100000.00, 0.00, 50000.00, 5, 0, 0, 0, '2026-02-23 12:59:30', '2026-02-23 12:59:30'),
(60, 63, 100000.00, 0.00, 50000.00, 5, 0, 0, 0, '2026-02-23 12:56:12', '2026-02-23 12:56:12'),
(59, 62, 5000.00, 5000.00, 0.00, 10, 10, 1, 0, '2026-02-20 23:58:21', '2026-02-20 23:58:21'),
(58, 60, 500000.00, 0.00, 5000.00, 100, 50, 0, 0, '2025-12-20 10:14:10', '2025-12-20 10:49:49'),
(57, 61, 100000.00, 0.00, 50000.00, 5, 0, 0, 0, '2026-01-26 12:40:27', '2026-01-26 12:40:27');

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

--
-- Table structure for table `wallet_transactions`
--

CREATE TABLE `wallet_transactions` (
  `id` bigint UNSIGNED NOT NULL,
  `wallet_id` int UNSIGNED NOT NULL,
  `reference` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `direction` enum('credit','debit') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `operation_type` enum('transfer_in','transfer_out','bank_deposit','bank_withdrawal','bill_payment','card_debit','card_refund','fee_charge','reversal','adjustment','wallet_transfer_in','wallet_transfer_out','reward_credit','reward_conversion','fx_conversion','card_creation','bank_transfer_out','bank_transfer_reversal','bank_transfer_in','fee_income','stamp_duty','stamp_duty_hold') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `amount` decimal(15,2) NOT NULL,
  `balance_before` decimal(15,2) NOT NULL,
  `balance_after` decimal(15,2) NOT NULL,
  `status` enum('pending','successful','failed','reversed') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'successful',
  `meta` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `created_at` datetime DEFAULT NULL,
  `idempotency_key` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `channel` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `account_role` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'USER_WALLET',
  `contra_wallet_id` int DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `wallet_transactions`
--

INSERT INTO `wallet_transactions` (`id`, `wallet_id`, `reference`, `direction`, `operation_type`, `type`, `amount`, `balance_before`, `balance_after`, `status`, `meta`, `created_at`, `idempotency_key`, `channel`, `account_role`, `contra_wallet_id`) VALUES
(299, 18, 'W2W-df86b4c84bbc', 'credit', 'transfer_in', 'wallet_transfer', 50000.00, 12147000.65, 12097000.65, 'successful', '{\"narration\":\"TRF FR IG - W2W-df86b4c84bbc\",\"from_user_id\":\"72\",\"from\":{\"account_name\":\"AknaPay\\/Ohunayo Gege\",\"account_number\":\"0800379373\",\"bank_name\":\"GTBank\"},\"to\":{\"account_name\":\"Ohunayo Gege\",\"account_number\":\"5300229818\",\"bank_name\":\"9psb\"}}', '2026-01-27 02:49:18', NULL, NULL, 'USER_WALLET', NULL),
(300, 0, 'W2W-df86b4c84bbc', 'credit', 'transfer_in', NULL, 0.00, 0.00, 12097000.65, 'successful', NULL, NULL, NULL, NULL, 'USER_WALLET', NULL),
(302, 0, 'W2W-310a4e6f9ed2', 'credit', 'transfer_in', NULL, 0.00, 0.00, 12087000.65, 'successful', NULL, NULL, NULL, NULL, 'USER_WALLET', NULL),
(310, 0, 'W2W-c2f2f51b7d31', 'credit', 'transfer_in', NULL, 0.00, 0.00, 71007419082.23, 'successful', NULL, NULL, NULL, NULL, 'USER_WALLET', NULL),
(307, 60, 'B2B-872bf4835128', 'debit', 'bank_transfer_out', 'bank_transfer', 50075.00, 71007429082.23, 71007379007.23, 'failed', '{\"narration\":\"TRF TO OHUNAYO  GEGE\",\"bank\":{\"bank_code\":\"100004\",\"bank_name\":\"OPAY\",\"account_number\":\"8149983395\",\"account_name\":\"OHUNAYO  GEGE\"},\"fees\":{\"total_fee\":75,\"stamp_duty\":50,\"transfer_fee\":25,\"cashback\":0}}', '2026-01-29 03:10:24', 'f848794a-2cce-4da1-a94d-6286dce04294:user-debit', 'bank', 'USER_WALLET', 2),
(308, 0, 'B2B-872bf4835128', 'credit', 'transfer_in', NULL, 0.00, 0.00, 71007379007.23, 'failed', NULL, NULL, NULL, NULL, 'USER_WALLET', NULL),
(309, 60, 'W2W-c2f2f51b7d31', 'debit', 'wallet_transfer_out', 'wallet_transfer', 10000.00, 71007429082.23, 71007419082.23, 'successful', '{\"narration\":\"TRF FR OHUNAYO GEGE\",\"from_user_id\":\"127\",\"from\":{\"account_name\":\"Ohunayo Gege\",\"account_number\":\"5300229818\",\"bank_name\":\"9psb\"},\"to\":{\"account_name\":\"AknaPay\\/Ohunayo Gege\",\"account_number\":\"0800379373\",\"bank_name\":\"GTBank\"}}', '2026-01-31 01:48:41', 'a12812a9-27f4-4cd1-bb22-a7e71da169da', 'wallet', 'USER_WALLET', 18),
(301, 18, 'W2W-310a4e6f9ed2', 'debit', 'wallet_transfer_out', 'wallet_transfer', 10000.00, 12097000.65, 12087000.65, 'successful', '{\"narration\":\"TRF FR IG - W2W-310a4e6f9ed2\",\"from_user_id\":\"72\",\"from\":{\"account_name\":\"AknaPay\\/Ohunayo Gege\",\"account_number\":\"0800379373\",\"bank_name\":\"GTBank\"},\"to\":{\"account_name\":\"Ohunayo Gege\",\"account_number\":\"5300229818\",\"bank_name\":\"9psb\"}}', '2026-01-27 03:10:20', 'aa48d3ea-dd29-4d3b-9086-0a67e98899bf', 'wallet', 'USER_WALLET', 60),
(297, 18, 'W2W-c92a49ebc09c', 'credit', 'wallet_transfer_out', 'wallet_transfer', 10000.00, 12157000.65, 12147000.65, 'successful', '{\"narration\":\"TRF FR IG - W2W-c92a49ebc09c\",\"from_user_id\":\"72\",\"from\":{\"account_name\":\"AknaPay\\/Ohunayo Gege\",\"account_number\":\"0800379373\",\"bank_name\":\"GTBank\"},\"to\":{\"account_name\":\"Ohunayo Gege\",\"account_number\":\"5300229818\",\"bank_name\":\"9psb\"}}', '2026-01-27 02:41:40', NULL, NULL, 'USER_WALLET', NULL);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `admin_audit_logs`
--
ALTER TABLE `admin_audit_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_admin_action` (`admin_id`,`action`);

--
-- Indexes for table `admin_notes`
--
ALTER TABLE `admin_notes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_entity` (`entity_type`,`entity_id`),
  ADD KEY `idx_admin` (`admin_id`),
  ADD KEY `idx_created_at` (`created_at`);

--
-- Indexes for table `admin_profiles`
--
ALTER TABLE `admin_profiles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_admin_user` (`user_id`);

--
-- Indexes for table `admin_sessions`
--
ALTER TABLE `admin_sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_admin_session` (`admin_id`);

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

--
-- Indexes for table `auth_identities`
--
ALTER TABLE `auth_identities`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `type_secret` (`type`,`secret`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `auth_logins`
--
ALTER TABLE `auth_logins`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id_type_identifier` (`id_type`,`identifier`),
  ADD KEY `user_id` (`user_id`);

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

--
-- Indexes for table `auth_remember_tokens`
--
ALTER TABLE `auth_remember_tokens`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `selector` (`selector`),
  ADD KEY `auth_remember_tokens_user_id_foreign` (`user_id`);

--
-- Indexes for table `auth_token_logins`
--
ALTER TABLE `auth_token_logins`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id_type_identifier` (`id_type`,`identifier`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `bill_fulfillments`
--
ALTER TABLE `bill_fulfillments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_bill_request` (`bill_request_id`);

--
-- Indexes for table `bill_idempotencies`
--
ALTER TABLE `bill_idempotencies`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `idempotency_key` (`idempotency_key`);

--
-- Indexes for table `bill_requests`
--
ALTER TABLE `bill_requests`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_reference` (`reference`),
  ADD KEY `idx_user` (`user_id`),
  ADD KEY `idx_status` (`status`);

--
-- Indexes for table `biometric_tokens`
--
ALTER TABLE `biometric_tokens`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_token` (`token`),
  ADD KEY `idx_user_device` (`user_id`,`device_fingerprint`);

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

--
-- Indexes for table `cards`
--
ALTER TABLE `cards`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `provider_card_id` (`provider_card_id`),
  ADD KEY `idx_user_id` (`user_id`),
  ADD KEY `idx_provider_card_id` (`provider_card_id`);

--
-- Indexes for table `card_idempotencies`
--
ALTER TABLE `card_idempotencies`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `idempotency_key` (`idempotency_key`);

--
-- Indexes for table `card_limits`
--
ALTER TABLE `card_limits`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_tier_currency` (`kyc_tier`,`currency`);

--
-- Indexes for table `card_transactions`
--
ALTER TABLE `card_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_card_id` (`card_id`),
  ADD KEY `idx_user_id` (`user_id`),
  ADD KEY `idx_wallet_reference` (`wallet_reference`),
  ADD KEY `idx_provider_reference` (`provider_reference`);

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

--
-- Indexes for table `device_tokens`
--
ALTER TABLE `device_tokens`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_user_provider` (`user_id`,`provider`);

--
-- Indexes for table `device_verifications`
--
ALTER TABLE `device_verifications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_user_device` (`user_id`,`device_id`),
  ADD KEY `idx_status` (`status`);

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

--
-- Indexes for table `fraud_blacklist`
--
ALTER TABLE `fraud_blacklist`
  ADD PRIMARY KEY (`id`),
  ADD KEY `type_value` (`type`,`value`);

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

--
-- Indexes for table `fraud_step_up_challenges`
--
ALTER TABLE `fraud_step_up_challenges`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `challenge_id` (`challenge_id`),
  ADD KEY `idx_user_challenge` (`user_id`,`challenge_id`);

--
-- Indexes for table `idempotency_keys`
--
ALTER TABLE `idempotency_keys`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `key_value` (`key_value`);

--
-- Indexes for table `itokens`
--
ALTER TABLE `itokens`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `code` (`code`),
  ADD KEY `idx_user_status` (`user_id`,`status`);

--
-- Indexes for table `itoken_idempotencies`
--
ALTER TABLE `itoken_idempotencies`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `idempotency_key` (`idempotency_key`);

--
-- Indexes for table `itoken_transactions`
--
ALTER TABLE `itoken_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_token_action` (`token_id`,`action`);

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

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

--
-- Indexes for table `live_kyc_sessions`
--
ALTER TABLE `live_kyc_sessions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `reference_id` (`reference_id`),
  ADD KEY `idx_user_status` (`user_id`,`status`);

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

--
-- Indexes for table `provider_reports`
--
ALTER TABLE `provider_reports`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_provider_date` (`provider_id`,`report_date`),
  ADD KEY `idx_processed` (`processed`);

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

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

--
-- Indexes for table `provider_webhooks`
--
ALTER TABLE `provider_webhooks`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_provider_ref` (`provider`,`reference`);

--
-- Indexes for table `referrals`
--
ALTER TABLE `referrals`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uq_invited_user` (`invited_user_id`),
  ADD KEY `idx_referral_code` (`referral_code`),
  ADD KEY `fk_referrals_inviter` (`inviter_user_id`);

--
-- Indexes for table `registration_idempotency`
--
ALTER TABLE `registration_idempotency`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `idempotency_key` (`idempotency_key`);

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

--
-- Indexes for table `tier_limit_logs`
--
ALTER TABLE `tier_limit_logs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `user_id_date` (`user_id`,`date`);

--
-- Indexes for table `trusted_devices`
--
ALTER TABLE `trusted_devices`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_user_device` (`user_id`,`device_fingerprint`),
  ADD KEY `idx_user` (`user_id`),
  ADD KEY `idx_device` (`device_fingerprint`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `username` (`username`),
  ADD UNIQUE KEY `referral_code` (`referral_code`),
  ADD UNIQUE KEY `uq_referral_code` (`referral_code`),
  ADD KEY `idx_referral_code` (`referral_code`);

--
-- Indexes for table `user_notifications`
--
ALTER TABLE `user_notifications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_user_read` (`user_id`,`is_read`),
  ADD KEY `idx_user_created` (`user_id`,`created_at`);

--
-- Indexes for table `user_otps`
--
ALTER TABLE `user_otps`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `type` (`type`),
  ADD KEY `consumed` (`consumed`);

--
-- Indexes for table `velocity_events`
--
ALTER TABLE `velocity_events`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id_event_type` (`user_id`,`event_type`);

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

--
-- Indexes for table `wallet_daily_stats`
--
ALTER TABLE `wallet_daily_stats`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `wallet_id_stat_date` (`wallet_id`,`stat_date`);

--
-- Indexes for table `wallet_ledgers`
--
ALTER TABLE `wallet_ledgers`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_idempotency` (`idempotency_key`),
  ADD KEY `idx_wallet` (`wallet_id`),
  ADD KEY `idx_reference` (`reference`);

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

--
-- Indexes for table `wallet_transactions`
--
ALTER TABLE `wallet_transactions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_idempotency` (`idempotency_key`),
  ADD UNIQUE KEY `uniq_wallet_reference_type` (`wallet_id`,`reference`,`type`),
  ADD KEY `wallet_id` (`wallet_id`),
  ADD KEY `idx_reference` (`reference`),
  ADD KEY `idx_wallet_tx_wallet_role` (`wallet_id`,`account_role`),
  ADD KEY `idx_wallet_tx_reference` (`reference`),
  ADD KEY `idx_wallet_tx_created` (`created_at`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `admin_audit_logs`
--
ALTER TABLE `admin_audit_logs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT for table `admin_notes`
--
ALTER TABLE `admin_notes`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `admin_profiles`
--
ALTER TABLE `admin_profiles`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `admin_sessions`
--
ALTER TABLE `admin_sessions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `auth_groups_users`
--
ALTER TABLE `auth_groups_users`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `auth_identities`
--
ALTER TABLE `auth_identities`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=190;

--
-- AUTO_INCREMENT for table `auth_logins`
--
ALTER TABLE `auth_logins`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;

--
-- AUTO_INCREMENT for table `auth_permissions_users`
--
ALTER TABLE `auth_permissions_users`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;

--
-- AUTO_INCREMENT for table `auth_remember_tokens`
--
ALTER TABLE `auth_remember_tokens`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `auth_token_logins`
--
ALTER TABLE `auth_token_logins`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=58;

--
-- AUTO_INCREMENT for table `bill_fulfillments`
--
ALTER TABLE `bill_fulfillments`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT for table `bill_idempotencies`
--
ALTER TABLE `bill_idempotencies`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=114;

--
-- AUTO_INCREMENT for table `bill_requests`
--
ALTER TABLE `bill_requests`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=69;

--
-- AUTO_INCREMENT for table `biometric_tokens`
--
ALTER TABLE `biometric_tokens`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT for table `business_profiles`
--
ALTER TABLE `business_profiles`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `cards`
--
ALTER TABLE `cards`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `card_idempotencies`
--
ALTER TABLE `card_idempotencies`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `card_limits`
--
ALTER TABLE `card_limits`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `card_transactions`
--
ALTER TABLE `card_transactions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `customer_profiles`
--
ALTER TABLE `customer_profiles`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=49;

--
-- AUTO_INCREMENT for table `device_tokens`
--
ALTER TABLE `device_tokens`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `device_verifications`
--
ALTER TABLE `device_verifications`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `disputes`
--
ALTER TABLE `disputes`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=107;

--
-- AUTO_INCREMENT for table `fraud_blacklist`
--
ALTER TABLE `fraud_blacklist`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `fraud_logs`
--
ALTER TABLE `fraud_logs`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=102;

--
-- AUTO_INCREMENT for table `fraud_step_up_challenges`
--
ALTER TABLE `fraud_step_up_challenges`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `idempotency_keys`
--
ALTER TABLE `idempotency_keys`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `itokens`
--
ALTER TABLE `itokens`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `itoken_idempotencies`
--
ALTER TABLE `itoken_idempotencies`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `itoken_transactions`
--
ALTER TABLE `itoken_transactions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `kyc_businesses`
--
ALTER TABLE `kyc_businesses`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `kyc_customers`
--
ALTER TABLE `kyc_customers`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;

--
-- AUTO_INCREMENT for table `live_kyc_sessions`
--
ALTER TABLE `live_kyc_sessions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `provider_reports`
--
ALTER TABLE `provider_reports`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `provider_transactions`
--
ALTER TABLE `provider_transactions`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `provider_wallets`
--
ALTER TABLE `provider_wallets`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `provider_webhooks`
--
ALTER TABLE `provider_webhooks`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `referrals`
--
ALTER TABLE `referrals`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `registration_idempotency`
--
ALTER TABLE `registration_idempotency`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=67;

--
-- AUTO_INCREMENT for table `settings`
--
ALTER TABLE `settings`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tier_limit_logs`
--
ALTER TABLE `tier_limit_logs`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `trusted_devices`
--
ALTER TABLE `trusted_devices`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=145;

--
-- AUTO_INCREMENT for table `user_notifications`
--
ALTER TABLE `user_notifications`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;

--
-- AUTO_INCREMENT for table `user_otps`
--
ALTER TABLE `user_otps`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45;

--
-- AUTO_INCREMENT for table `velocity_events`
--
ALTER TABLE `velocity_events`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=113;

--
-- AUTO_INCREMENT for table `wallets`
--
ALTER TABLE `wallets`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=65;

--
-- AUTO_INCREMENT for table `wallet_daily_stats`
--
ALTER TABLE `wallet_daily_stats`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `wallet_ledgers`
--
ALTER TABLE `wallet_ledgers`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=76;

--
-- AUTO_INCREMENT for table `wallet_limits`
--
ALTER TABLE `wallet_limits`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=62;

--
-- AUTO_INCREMENT for table `wallet_transactions`
--
ALTER TABLE `wallet_transactions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=311;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `admin_audit_logs`
--
ALTER TABLE `admin_audit_logs`
  ADD CONSTRAINT `fk_audit_admin` FOREIGN KEY (`admin_id`) REFERENCES `users` (`id`);

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

--
-- Constraints for table `admin_sessions`
--
ALTER TABLE `admin_sessions`
  ADD CONSTRAINT `fk_session_admin` FOREIGN KEY (`admin_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `auth_groups_users`
--
ALTER TABLE `auth_groups_users`
  ADD CONSTRAINT `auth_groups_users_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `auth_identities`
--
ALTER TABLE `auth_identities`
  ADD CONSTRAINT `auth_identities_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `auth_permissions_users`
--
ALTER TABLE `auth_permissions_users`
  ADD CONSTRAINT `auth_permissions_users_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `auth_remember_tokens`
--
ALTER TABLE `auth_remember_tokens`
  ADD CONSTRAINT `auth_remember_tokens_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `bill_fulfillments`
--
ALTER TABLE `bill_fulfillments`
  ADD CONSTRAINT `fk_bill_fulfillment_request` FOREIGN KEY (`bill_request_id`) REFERENCES `bill_requests` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `live_kyc_sessions`
--
ALTER TABLE `live_kyc_sessions`
  ADD CONSTRAINT `fk_live_kyc_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `referrals`
--
ALTER TABLE `referrals`
  ADD CONSTRAINT `fk_referrals_invited` FOREIGN KEY (`invited_user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_referrals_inviter` FOREIGN KEY (`inviter_user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
COMMIT;
