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

START TRANSACTION;



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

--
-- Table structure for table `audit_logs`
--

CREATE TABLE `audit_logs` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `device` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `ipAddress` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `datenow` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `audit_logs`
--

INSERT INTO `audit_logs` (`id`, `user_id`, `device`, `ipAddress`, `datenow`) VALUES
(1, 9, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36', '41.58.235.97', '2023-02-14 11:24:12'),
(2, 9, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0', '41.58.218.20', '2023-02-17 12:58:39'),
(3, 9, 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Mobile/15E148 Safari/604.1', '102.89.33.204', '2023-02-17 14:28:27'),
(4, 9, 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 OPR/95.0.0.0 (Edition Campaign 34)', '102.89.33.222', '2023-02-17 19:39:23'),
(5, 9, 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1', '5.180.208.85', '2023-02-17 21:01:15'),
(6, 9, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36', '41.215.173.55', '2023-02-19 13:32:58'),
(7, 9, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0', '41.58.58.230', '2023-02-19 14:03:32'),
(8, 9, 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0', '102.89.22.160', '2023-02-20 09:33:19');

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

--
-- Table structure for table `card_request`
--

CREATE TABLE `card_request` (
  `id` int(11) NOT NULL,
  `reference_id` text COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `card_type` text COLLATE utf8mb3_unicode_ci NOT NULL,
  `card_reason` text COLLATE utf8mb3_unicode_ci NOT NULL,
  `card_request_status` int(11) NOT NULL DEFAULT 2,
  `createdAt` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

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

--
-- Table structure for table `crypto_currency`
--

CREATE TABLE `crypto_currency` (
  `id` int(11) NOT NULL,
  `crypto_name` varchar(200) COLLATE utf8mb3_unicode_ci NOT NULL,
  `wallet_address` text COLLATE utf8mb3_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `crypto_currency`
--

INSERT INTO `crypto_currency` (`id`, `crypto_name`, `wallet_address`, `created_at`) VALUES
(1, 'Bitcoin', '8rtknjbhgfgvsnkjhgxfgxjhkx', '2022-10-21 17:33:59');

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

--
-- Table structure for table `deposit`
--

CREATE TABLE `deposit` (
  `d_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `refrence_id` text COLLATE utf8mb3_unicode_ci NOT NULL,
  `image` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `amount` double NOT NULL,
  `wallet_address` text COLLATE utf8mb3_unicode_ci NOT NULL,
  `crypto_id` int(11) NOT NULL,
  `crypto_status` int(15) NOT NULL DEFAULT 0,
  `created_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

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

--
-- Table structure for table `domestic_transfer`
--

CREATE TABLE `domestic_transfer` (
  `dom_id` int(11) NOT NULL,
  `acct_id` int(11) DEFAULT NULL,
  `refrence_id` text COLLATE utf8mb3_unicode_ci NOT NULL,
  `amount` double NOT NULL DEFAULT 0,
  `bank_name` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `acct_name` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `acct_number` int(15) NOT NULL,
  `trans_type` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'domestic transfer',
  `acct_type` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `acct_remarks` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `dom_status` int(11) NOT NULL DEFAULT 0,
  `created_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

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

--
-- Table structure for table `loan`
--

CREATE TABLE `loan` (
  `loan_id` int(11) NOT NULL,
  `loan_reference_id` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `acct_id` int(11) NOT NULL,
  `amount` double DEFAULT 0,
  `loan_remarks` text COLLATE utf8mb3_unicode_ci NOT NULL,
  `loan_status` int(11) NOT NULL DEFAULT 0,
  `loan_message` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

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

--
-- Table structure for table `messages`
--

CREATE TABLE `messages` (
  `id` int(11) NOT NULL,
  `FullName` text NOT NULL,
  `PhoneNumber` text NOT NULL,
  `locationcus` text NOT NULL,
  `Addresscus` text NOT NULL,
  `City` text NOT NULL,
  `Customer` text NOT NULL,
  `Messagecus` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

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

CREATE TABLE `settings` (
  `id` int(11) NOT NULL,
  `image` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `about_us` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `url_name` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `url_tel` varchar(15) DEFAULT NULL,
  `url_email` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `trans_limit_min` double DEFAULT NULL,
  `trans_limit_max` double DEFAULT NULL,
  `livechat` text NOT NULL COMMENT 'Live Widget',
  `twillio_status` int(11) NOT NULL DEFAULT 0 COMMENT '0=off,1=on',
  `billing_code` int(11) NOT NULL DEFAULT 0 COMMENT '0=off,1=on',
  `transfer` int(11) NOT NULL DEFAULT 1 COMMENT '0=off,1=on',
  `bank_deposit` int(11) NOT NULL DEFAULT 0 COMMENT '0=off,1=on'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `settings`
--

INSERT INTO `settings` (`id`, `image`, `about_us`, `url_name`, `url_tel`, `url_email`, `trans_limit_min`, `trans_limit_max`, `livechat`, `twillio_status`, `billing_code`, `transfer`, `bank_deposit`) VALUES
(1, 'logo.png', '', 'One Capital', '2348178611330', 'demotemi@gmail.com', 500, 500000, '', 0, 1, 1, 0);

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

--
-- Table structure for table `transactions`
--

CREATE TABLE `transactions` (
  `trans_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `refrence_id` text COLLATE utf8mb3_unicode_ci NOT NULL,
  `amount` double NOT NULL,
  `trans_type` int(15) NOT NULL,
  `sender_name` text COLLATE utf8mb3_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb3_unicode_ci NOT NULL,
  `trans_status` int(11) NOT NULL DEFAULT 0,
  `created_at` text COLLATE utf8mb3_unicode_ci NOT NULL,
  `time_created` text COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

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

--
-- Table structure for table `v_bank`
--

CREATE TABLE `v_bank` (
  `id` int(11) NOT NULL,
  `bank_name` text COLLATE utf8mb3_unicode_ci NOT NULL,
  `routine_no` text COLLATE utf8mb3_unicode_ci NOT NULL,
  `acct_no` text COLLATE utf8mb3_unicode_ci NOT NULL,
  `swift_code` text COLLATE utf8mb3_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

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

--
-- Table structure for table `wire_transfer`
--

CREATE TABLE `wire_transfer` (
  `wire_id` int(11) NOT NULL,
  `acct_id` int(11) NOT NULL,
  `refrence_id` text COLLATE utf8mb3_unicode_ci NOT NULL,
  `amount` double NOT NULL DEFAULT 0,
  `bank_name` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `acct_name` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `acct_number` varchar(200) COLLATE utf8mb3_unicode_ci NOT NULL,
  `trans_type` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'wire transfer',
  `acct_type` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `acct_country` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `acct_swift` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `acct_routing` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `acct_remarks` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `wire_status` int(11) NOT NULL DEFAULT 0,
  `createdAt` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

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

--
-- Table structure for table `withdrawal`
--

CREATE TABLE `withdrawal` (
  `id` int(11) NOT NULL,
  `reference_id` varchar(200) NOT NULL,
  `user_id` int(11) NOT NULL,
  `amount` float NOT NULL,
  `withdraw_method` varchar(200) NOT NULL,
  `trans_type` int(11) NOT NULL,
  `wallet_address` text NOT NULL,
  `bankname` text NOT NULL,
  `account_number` text NOT NULL,
  `routineno` text NOT NULL,
  `acctname` text NOT NULL,
  `status` int(11) NOT NULL DEFAULT 0,
  `createdAt` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

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

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

--
-- Indexes for table `deposit`
--
ALTER TABLE `deposit`
  ADD PRIMARY KEY (`d_id`);

--
-- Indexes for table `domestic_transfer`
--
ALTER TABLE `domestic_transfer`
  ADD PRIMARY KEY (`dom_id`);

--
-- Indexes for table `loan`
--
ALTER TABLE `loan`
  ADD PRIMARY KEY (`loan_id`);

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

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

--
-- Indexes for table `transactions`
--
ALTER TABLE `transactions`
  ADD PRIMARY KEY (`trans_id`);

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

--
-- Indexes for table `wire_transfer`
--
ALTER TABLE `wire_transfer`
  ADD PRIMARY KEY (`wire_id`);

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

--
-- AUTO_INCREMENT for table `audit_logs`
--
ALTER TABLE `audit_logs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `card_request`
--
ALTER TABLE `card_request`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `crypto_currency`
--
ALTER TABLE `crypto_currency`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=56;

--
-- AUTO_INCREMENT for table `deposit`
--
ALTER TABLE `deposit`
  MODIFY `d_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `domestic_transfer`
--
ALTER TABLE `domestic_transfer`
  MODIFY `dom_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `loan`
--
ALTER TABLE `loan`
  MODIFY `loan_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `messages`
--
ALTER TABLE `messages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `settings`
--
ALTER TABLE `settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `transactions`
--
ALTER TABLE `transactions`
  MODIFY `trans_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=51;

--
-- AUTO_INCREMENT for table `v_bank`
--
ALTER TABLE `v_bank`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=48;

--
-- AUTO_INCREMENT for table `wire_transfer`
--
ALTER TABLE `wire_transfer`
  MODIFY `wire_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `withdrawal`
--
ALTER TABLE `withdrawal`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;

