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

START TRANSACTION;



--
-- Database: `derionfin_placapital`
--

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

--
-- Table structure for table `account`
--

CREATE TABLE `account` (
  `id` int NOT NULL,
  `acc_no` varchar(20) DEFAULT NULL,
  `upass` varchar(100) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `fname` varchar(100) DEFAULT NULL,
  `lname` varchar(100) DEFAULT NULL,
  `full_name` varchar(255) DEFAULT NULL,
  `currency` varchar(25) DEFAULT NULL,
  `addr` varchar(100) DEFAULT NULL,
  `town` varchar(255) DEFAULT NULL,
  `state` varchar(255) DEFAULT NULL,
  `country` varchar(255) DEFAULT NULL,
  `zip` varchar(255) DEFAULT NULL,
  `work` varchar(100) DEFAULT NULL,
  `sex` varchar(25) DEFAULT NULL,
  `dob` varchar(30) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `reg_date` varchar(25) DEFAULT NULL,
  `a_bal` int DEFAULT NULL,
  `status` enum('Active','Inactive','Dormant/Inactive','Disabled','Close','Pending') DEFAULT 'Active',
  `credit_limit` int DEFAULT NULL,
  `cot` varchar(20) DEFAULT NULL,
  `tac` varchar(6) DEFAULT NULL,
  `tax` varchar(20) DEFAULT NULL,
  `imf` varchar(20) DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `code` varchar(255) DEFAULT NULL,
  `otp_enabled` tinyint DEFAULT NULL,
  `email_enabled` tinyint DEFAULT NULL,
  `inactive` tinyint DEFAULT NULL,
  `active` tinyint DEFAULT NULL,
  `otp` varchar(255) DEFAULT NULL,
  `blocked_transfer` tinyint NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `account_transactions`
--

CREATE TABLE `account_transactions` (
  `id` int NOT NULL,
  `userID` int NOT NULL,
  `type` varchar(25) COLLATE utf8mb4_general_ci NOT NULL,
  `date` varchar(50) COLLATE utf8mb4_general_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `admin`
--

CREATE TABLE `admin` (
  `id` int NOT NULL,
  `uname` varchar(40) NOT NULL,
  `upass` varchar(40) NOT NULL,
  `email` varchar(100) NOT NULL,
  `verified_count` enum('Y','N') DEFAULT 'Y'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `admin`
--

INSERT INTO `admin` (`id`, `uname`, `upass`, `email`, `verified_count`) VALUES
(1, 'Admin', 'admin@admin.com', 'admin@admin.com', 'Y');

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

--
-- Table structure for table `alerts`
--

CREATE TABLE `alerts` (
  `id` int NOT NULL,
  `uname` varchar(40) NOT NULL,
  `amount` int NOT NULL,
  `sender_name` varchar(40) NOT NULL,
  `type` varchar(10) NOT NULL,
  `remarks` varchar(100) NOT NULL,
  `date` varchar(20) NOT NULL,
  `time` varchar(20) NOT NULL,
  `status` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `benefeciaries`
--

CREATE TABLE `benefeciaries` (
  `id` int NOT NULL,
  `userID` int NOT NULL,
  `beneficiary_type` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `account_number` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `beneficiary_name` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `beneficiary_bank` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `beneficiary_country` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `iban` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `routing_number` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `swift` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `billings`
--

CREATE TABLE `billings` (
  `id` int NOT NULL,
  `userID` int NOT NULL,
  `first_billing` int NOT NULL,
  `second_billing` int NOT NULL,
  `third_billing` int NOT NULL,
  `fourth_billing` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `card_applications`
--

CREATE TABLE `card_applications` (
  `id` int NOT NULL,
  `userID` int NOT NULL,
  `card_type` varchar(25) COLLATE utf8mb4_general_ci NOT NULL,
  `card_number` varchar(25) COLLATE utf8mb4_general_ci NOT NULL,
  `cvv` varchar(25) COLLATE utf8mb4_general_ci NOT NULL,
  `expiry_date` varchar(25) COLLATE utf8mb4_general_ci NOT NULL,
  `status` tinyint NOT NULL,
  `date` varchar(50) COLLATE utf8mb4_general_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `configuration`
--

CREATE TABLE `configuration` (
  `id` int NOT NULL,
  `first_billing` tinyint NOT NULL,
  `second_billing` tinyint NOT NULL,
  `third_billing` tinyint NOT NULL,
  `fourth_billing` tinyint NOT NULL,
  `otp_check` tinyint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `configuration`
--

INSERT INTO `configuration` (`id`, `first_billing`, `second_billing`, `third_billing`, `fourth_billing`, `otp_check`) VALUES
(1, 1, 1, 1, 1, 1);

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

--
-- Table structure for table `loan_applications`
--

CREATE TABLE `loan_applications` (
  `id` int NOT NULL,
  `userID` int NOT NULL,
  `amount` int NOT NULL,
  `currency` varchar(10) COLLATE utf8mb4_general_ci NOT NULL,
  `status` tinyint NOT NULL,
  `date` varchar(50) COLLATE utf8mb4_general_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `message`
--

CREATE TABLE `message` (
  `id` int NOT NULL,
  `sender_name` varchar(40) DEFAULT NULL,
  `userID` int DEFAULT NULL,
  `full_name` varchar(255) DEFAULT NULL,
  `reci_name` varchar(40) DEFAULT NULL,
  `subject` varchar(100) DEFAULT NULL,
  `msg` varchar(2000) DEFAULT NULL,
  `photo` varchar(255) DEFAULT NULL,
  `read` enum('unread','opened') DEFAULT 'unread',
  `date` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `temp_account`
--

CREATE TABLE `temp_account` (
  `id` int NOT NULL,
  `upass` varchar(100) NOT NULL,
  `email` varchar(100) NOT NULL,
  `type` varchar(100) NOT NULL,
  `fname` varchar(100) NOT NULL,
  `mname` varchar(100) NOT NULL,
  `lname` varchar(100) NOT NULL,
  `addr` varchar(100) NOT NULL,
  `work` varchar(100) NOT NULL,
  `sex` varchar(10) NOT NULL,
  `dob` varchar(30) NOT NULL,
  `ip` varchar(30) NOT NULL,
  `phone` varchar(20) NOT NULL,
  `reg_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `marry` varchar(20) NOT NULL,
  `currency` varchar(5) NOT NULL,
  `code` varchar(6) NOT NULL,
  `verify` enum('Y','N') DEFAULT 'N'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `temp_transfer`
--

CREATE TABLE `temp_transfer` (
  `id` int NOT NULL,
  `userID` int NOT NULL,
  `email` varchar(40) DEFAULT NULL,
  `sender_account_number` varchar(255) DEFAULT NULL,
  `amount` int DEFAULT NULL,
  `acc_no` varchar(255) DEFAULT NULL,
  `acc_name` varchar(60) DEFAULT NULL,
  `bank_name` varchar(40) DEFAULT NULL,
  `country` varchar(255) DEFAULT NULL,
  `iban` varchar(50) DEFAULT NULL,
  `swift` varchar(15) DEFAULT NULL,
  `routing` varchar(20) DEFAULT NULL,
  `type` varchar(20) DEFAULT NULL,
  `remarks` text,
  `status` tinyint DEFAULT NULL,
  `transfer_mode` varchar(255) DEFAULT NULL,
  `date` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `ticket`
--

CREATE TABLE `ticket` (
  `id` int NOT NULL,
  `tc` int NOT NULL,
  `sender_name` varchar(40) NOT NULL,
  `mail` varchar(40) DEFAULT NULL,
  `subject` varchar(100) NOT NULL,
  `msg` varchar(1000) NOT NULL,
  `status` enum('Pending','Replied') DEFAULT 'Pending',
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

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

CREATE TABLE `transactions` (
  `id` int NOT NULL,
  `userID` int DEFAULT NULL,
  `receiver_name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `account_number` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `bank_name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `amount` int DEFAULT NULL,
  `transfer_type` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `transfer_mode` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` tinyint DEFAULT NULL,
  `date` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `transfer`
--

CREATE TABLE `transfer` (
  `id` int NOT NULL,
  `userID` int NOT NULL,
  `amount` varchar(100) DEFAULT NULL,
  `bank_name` varchar(40) DEFAULT NULL,
  `acc_name` varchar(100) DEFAULT NULL,
  `acc_no` varchar(20) DEFAULT NULL,
  `reci_name` varchar(30) DEFAULT NULL,
  `type` varchar(20) DEFAULT NULL,
  `swift` varchar(100) DEFAULT NULL,
  `routing` varchar(100) DEFAULT NULL,
  `remarks` varchar(500) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `status` enum('Failed','Successful','Pending') NOT NULL DEFAULT 'Successful',
  `date` varchar(255) DEFAULT NULL,
  `time` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Indexes for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `account`
--
ALTER TABLE `account`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=177;

--
-- AUTO_INCREMENT for table `account_transactions`
--
ALTER TABLE `account_transactions`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `alerts`
--
ALTER TABLE `alerts`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=430;

--
-- AUTO_INCREMENT for table `benefeciaries`
--
ALTER TABLE `benefeciaries`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

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

--
-- AUTO_INCREMENT for table `card_applications`
--
ALTER TABLE `card_applications`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `configuration`
--
ALTER TABLE `configuration`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

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

--
-- AUTO_INCREMENT for table `message`
--
ALTER TABLE `message`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=98;

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

--
-- AUTO_INCREMENT for table `temp_transfer`
--
ALTER TABLE `temp_transfer`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=118;

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

--
-- AUTO_INCREMENT for table `transactions`
--
ALTER TABLE `transactions`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=494;

--
-- AUTO_INCREMENT for table `transfer`
--
ALTER TABLE `transfer`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
COMMIT;

