-- http://www.phpmyadmin.net
--




--
-- Database: `plutous`
--

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

--
-- Table structure for table `currency`
--

CREATE TABLE IF NOT EXISTS `currency` (
`id` int(11) NOT NULL,
  `currency_name` varchar(500) NOT NULL,
  `multiplication_factor` float NOT NULL,
  `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `currency`
--

INSERT INTO `currency` (`id`, `currency_name`, `multiplication_factor`, `createdAt`, `updatedAt`) VALUES
(1, 'USD', 3.67, '2017-10-19 10:37:53', '2017-10-19 10:46:08'),
(2, 'GBP', 4.83, '2017-10-19 10:37:53', '2017-10-19 10:46:20'),
(3, 'CAD', 2.95, '2017-10-19 10:39:15', '2017-10-19 10:46:39'),
(4, 'QAR', 1.01, '2017-10-19 10:39:15', '2017-10-19 10:47:04'),
(5, 'EUR', 4.34, '2017-10-19 10:40:02', '2017-10-19 10:47:15'),
(6, 'CHF', 3.76, '2017-10-19 10:40:02', '2017-10-19 10:47:32');

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

--
-- Table structure for table `financialtracking`
--

CREATE TABLE IF NOT EXISTS `financialtracking` (
`id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `account_title` varchar(500) NOT NULL,
  `bankname` varchar(500) NOT NULL,
  `balance` varchar(500) NOT NULL,
  `currency` varchar(500) NOT NULL,
  `accounttype` varchar(500) NOT NULL,
  `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `financialtracking`
--

INSERT INTO `financialtracking` (`id`, `user_id`, `account_title`, `bankname`, `balance`, `currency`, `accounttype`, `createdAt`, `updatedAt`) VALUES
(31, 1, 'Ijaz', 'Meezan', '100000', 'AED', 'account', '2017-10-19 09:28:06', '2017-10-19 09:28:06'),
(32, 1, 'Ijaz', 'Meezan', '100000', 'AED', 'account', '2017-10-19 09:28:28', '2017-10-19 09:28:28'),
(33, 1, 'Ijaz', 'Meezan', '150', 'GBP', 'account', '2017-10-19 09:57:16', '2017-10-19 11:00:29'),
(34, 1, 'Ijaz', 'Meezan', '900', 'USD', 'account', '2017-10-19 10:01:18', '2017-10-19 10:57:59'),
(36, 4, 'Ijaz', 'Meezan', '120', 'CHF', 'account', '2017-10-19 12:10:55', '2017-10-19 12:10:55'),
(37, 17, 'Shoaib', 'Meezan', '120', 'CHF', 'account', '2017-10-19 12:10:55', '2017-10-19 12:10:55'),
(38, 17, 'Jilani', 'Meezan', '900', 'USD', 'account', '2017-10-19 10:01:18', '2017-10-19 10:57:59'),
(39, 17, 'Shoaib Jilani', 'Meezan', '150', 'GBP', 'account', '2017-10-19 09:57:16', '2017-11-14 07:23:41'),
(40, 17, 'Saving', 'Home', '200', 'AED', 'Cash', '2017-11-14 10:42:04', '2017-11-14 10:42:04');

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

--
-- Table structure for table `phoneverification`
--

CREATE TABLE IF NOT EXISTS `phoneverification` (
`id` int(11) NOT NULL,
  `phone` varchar(500) NOT NULL,
  `code` varchar(500) NOT NULL,
  `createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `risk_profile`
--

CREATE TABLE IF NOT EXISTS `risk_profile` (
`id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `question_id` int(11) NOT NULL,
  `option_id` int(11) NOT NULL,
  `createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` varchar(150) NOT NULL,
  `updatedBy` varchar(150) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `risk_profile`
--

INSERT INTO `risk_profile` (`id`, `user_id`, `question_id`, `option_id`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`) VALUES
(1, 17, 1, 2, '2017-11-14 11:30:20', '2017-11-14 11:30:20', 'Shoaib Jilani', 'Shoaib Jilani'),
(2, 17, 2, 6, '2017-11-14 11:30:20', '2017-11-14 11:30:20', 'Shoaib Jilani', 'Shoaib Jilani'),
(3, 17, 3, 14, '2017-11-14 11:30:20', '2017-11-14 11:30:20', 'Shoaib Jilani', 'Shoaib Jilani'),
(4, 17, 4, 18, '2017-11-14 11:30:20', '2017-11-14 11:30:20', 'Shoaib Jilani', 'Shoaib Jilani'),
(5, 17, 5, 25, '2017-11-14 11:30:20', '2017-11-14 11:30:20', 'Shoaib Jilani', 'Shoaib Jilani'),
(6, 17, 6, 30, '2017-11-14 11:30:20', '2017-11-14 11:30:20', 'Shoaib Jilani', 'Shoaib Jilani');

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

--
-- Table structure for table `risk_questions`
--

CREATE TABLE IF NOT EXISTS `risk_questions` (
`id` int(11) NOT NULL,
  `question` varchar(500) NOT NULL,
  `type` varchar(50) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` varchar(150) NOT NULL,
  `updatedBy` varchar(150) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `risk_questions`
--

INSERT INTO `risk_questions` (`id`, `question`, `type`, `status`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`) VALUES
(1, 'What is your age?', 'assessment', 1, '2017-11-09 17:59:14', '2017-11-09 17:59:14', 'System', 'System'),
(2, 'What is your time frame for investments?', 'assessment', 1, '2017-11-09 17:59:14', '2017-11-09 17:59:14', 'System', 'System'),
(3, 'What describes your investment objectives?', 'assessment', 1, '2017-11-10 10:30:38', '2017-11-10 10:30:38', 'System', 'System'),
(4, 'What is your investment experience?', 'assessment', 1, '2017-11-10 10:30:38', '2017-11-10 10:30:38', 'System', 'System'),
(5, 'What potential loss of value of your portfolio is acceptable to you given the potential for\r\nproportionate gains?', 'assessment', 1, '2017-11-10 10:30:38', '2017-11-10 10:30:38', 'System', 'System'),
(6, 'What percentage of your savings have you allocated to invest with us?', 'assessment', 1, '2017-11-10 10:30:38', '2017-11-10 10:30:38', 'System', 'System');

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

--
-- Table structure for table `risk_question_options`
--

CREATE TABLE IF NOT EXISTS `risk_question_options` (
`optionid` int(11) NOT NULL,
  `question_id` int(11) NOT NULL,
  `option` varchar(300) NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `marks` int(11) NOT NULL DEFAULT '0',
  `createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` varchar(150) NOT NULL,
  `updatedBy` varchar(150) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `risk_question_options`
--

INSERT INTO `risk_question_options` (`optionid`, `question_id`, `option`, `sort`, `marks`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`) VALUES
(1, 1, 'Over 55', 0, 1, '2017-11-09 18:06:04', '2017-11-09 18:06:04', 'System', 'System'),
(2, 1, 'Between 45 and 55', 1, 2, '2017-11-09 18:06:04', '2017-11-09 18:06:04', 'System', 'System'),
(3, 1, 'Between 35 and 45', 2, 3, '2017-11-09 18:07:01', '2017-11-09 18:07:01', 'System', 'System'),
(4, 1, 'Between 25 and 35', 3, 4, '2017-11-09 18:07:01', '2017-11-09 18:07:01', 'System', 'System'),
(5, 1, 'Under 25', 4, 5, '2017-11-09 18:07:49', '2017-11-09 18:07:49', 'System', 'System'),
(6, 2, 'Under 1 Year', 0, 1, '2017-11-09 18:07:49', '2017-11-09 18:07:49', 'System', 'System'),
(7, 2, '1 to 2 Years', 1, 2, '2017-11-09 18:08:40', '2017-11-09 18:08:40', 'System', 'System'),
(8, 2, '2 to 5 Years', 2, 3, '2017-11-09 18:08:40', '2017-11-09 18:08:40', 'System', 'System'),
(9, 2, '5 to 10 Years', 3, 4, '2017-11-09 18:09:36', '2017-11-09 18:09:36', 'System', 'System'),
(10, 2, 'Over 10 Years', 4, 5, '2017-11-09 18:09:36', '2017-11-09 18:09:36', 'System', 'System'),
(11, 3, 'Preserving capital', 0, 1, '2017-11-09 18:07:49', '2017-11-09 18:07:49', 'System', 'System'),
(12, 3, 'Generating income – Lower risk', 1, 2, '2017-11-09 18:08:40', '2017-11-09 18:08:40', 'System', 'System'),
(13, 3, 'Balancing growth and income – Medium risk', 2, 3, '2017-11-09 18:08:40', '2017-11-09 18:08:40', 'System', 'System'),
(14, 3, 'Achieving growth – High risk', 3, 4, '2017-11-09 18:09:36', '2017-11-09 18:09:36', 'System', 'System'),
(15, 3, 'Capturing highest potential returns – Highest risk', 4, 5, '2017-11-09 18:09:36', '2017-11-09 18:09:36', 'System', 'System'),
(16, 4, 'Fixed deposits and money market funds', 0, 1, '2017-11-09 18:07:49', '2017-11-09 18:07:49', 'System', 'System'),
(17, 4, 'I have invested in capital protected investments', 1, 2, '2017-11-09 18:08:40', '2017-11-09 18:08:40', 'System', 'System'),
(18, 4, 'I have invested in bonds and bond funds', 2, 3, '2017-11-09 18:08:40', '2017-11-09 18:08:40', 'System', 'System'),
(19, 4, 'I have invested in equities and equity funds', 3, 4, '2017-11-09 18:09:36', '2017-11-09 18:09:36', 'System', 'System'),
(20, 4, 'I have invested in option, futures, warrants, currencies, alternative investments and\r\nother securities', 4, 5, '2017-11-09 18:09:36', '2017-11-09 18:09:36', 'System', 'System'),
(21, 5, 'Less than 5%', 0, 1, '2017-11-09 18:07:49', '2017-11-09 18:07:49', 'System', 'System'),
(22, 5, 'Between 5% and 10%', 1, 2, '2017-11-09 18:08:40', '2017-11-09 18:08:40', 'System', 'System'),
(23, 5, 'Between 10% and 20%', 2, 3, '2017-11-09 18:08:40', '2017-11-09 18:08:40', 'System', 'System'),
(24, 5, 'Between 20% and 35%', 3, 4, '2017-11-09 18:09:36', '2017-11-09 18:09:36', 'System', 'System'),
(25, 5, 'More than 35%other securities', 4, 5, '2017-11-09 18:09:36', '2017-11-09 18:09:36', 'System', 'System'),
(26, 6, 'Over 75%', 0, 1, '2017-11-09 18:07:49', '2017-11-09 18:07:49', 'System', 'System'),
(27, 6, 'Between 50% and 75%', 1, 2, '2017-11-09 18:08:40', '2017-11-09 18:08:40', 'System', 'System'),
(28, 6, 'Between 25% and 50%', 2, 3, '2017-11-09 18:08:40', '2017-11-09 18:08:40', 'System', 'System'),
(29, 6, 'Between 10% and 25%', 3, 4, '2017-11-09 18:09:36', '2017-11-09 18:09:36', 'System', 'System'),
(30, 6, 'Less than 10%', 4, 5, '2017-11-09 18:09:36', '2017-11-09 18:09:36', 'System', 'System');

--
-- Indexes for dumped tables
--

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

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

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

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

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

--
-- Indexes for table `risk_question_options`
--
ALTER TABLE `risk_question_options`
 ADD PRIMARY KEY (`optionid`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `currency`
--
ALTER TABLE `currency`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `financialtracking`
--
ALTER TABLE `financialtracking`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=41;
--
-- AUTO_INCREMENT for table `phoneverification`
--
ALTER TABLE `phoneverification`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `risk_profile`
--
ALTER TABLE `risk_profile`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `risk_questions`
--
ALTER TABLE `risk_questions`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `risk_question_options`
--
ALTER TABLE `risk_question_options`
MODIFY `optionid` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=31;
