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




--
-- Database: `eventssp_ehaca`
--

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

--
-- Table structure for table `tbl_email`
--

CREATE TABLE `tbl_email` (
  `email_id` int(11) NOT NULL,
  `email_subject` varchar(255) NOT NULL,
  `email_content` blob NOT NULL,
  `email_description` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tbl_email`
--

INSERT INTO `tbl_email` (`email_id`, `email_subject`, `email_content`, `email_description`) VALUES
(1, 'SME Centre Conference 2017', 0x[encoded data, 4806 characters], 'SME Centre Conference 2017');

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

--
-- Table structure for table `tbl_id`
--

CREATE TABLE `tbl_id` (
  `id` int(11) NOT NULL,
  `id_itself` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tbl_id`
--

INSERT INTO `tbl_id` (`id`, `id_itself`) VALUES
(1, 3);

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

--
-- Table structure for table `tbl_registrant`
--

CREATE TABLE `tbl_registrant` (
  `registrant_id` int(11) NOT NULL,
  `role_id` int(11) NOT NULL DEFAULT '0',
  `registrant_attendance` varchar(50) DEFAULT NULL,
  `registrant_number` varchar(50) DEFAULT NULL,
  `registrant_sn` varchar(20) DEFAULT NULL,
  `registrant_salutation` varchar(10) DEFAULT NULL,
  `registrant_fullname` varchar(500) DEFAULT NULL,
  `registrant_company` varchar(500) DEFAULT NULL,
  `registrant_designation` varchar(200) DEFAULT NULL,
  `registrant_department` varchar(200) DEFAULT NULL,
  `registrant_seating_area` varchar(100) DEFAULT NULL,
  `registrant_source_list` varchar(20) DEFAULT NULL,
  `remarks` varchar(500) DEFAULT NULL,
  `registrant_datetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `registrant_replaced` tinyint(4) NOT NULL DEFAULT '0',
  `registrant_replacing` int(11) DEFAULT NULL,
  `email_sent` tinyint(4) NOT NULL DEFAULT '0',
  `confirm_sent` tinyint(4) NOT NULL DEFAULT '0',
  `remind_sent` tinyint(4) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tbl_registrant`
--

INSERT INTO `tbl_registrant` (`registrant_id`, `role_id`, `registrant_attendance`, `registrant_number`, `registrant_sn`, `registrant_salutation`, `registrant_fullname`, `registrant_company`, `registrant_designation`, `registrant_department`, `registrant_seating_area`, `registrant_source_list`, `remarks`, `registrant_datetime`, `registrant_replaced`, `registrant_replacing`, `email_sent`, `confirm_sent`, `remind_sent`) VALUES
(1, 1, 'Attending', 'M0001', '1', 'Mr.', 'Srinivas Shankaramanchi', 'SPI', 'Project Manager', 'ITO', 'F2', 'Abc', 'Test Remarks', '2017-03-23 10:15:27', 0, NULL, 0, 0, 0),
(2, 2, 'Not Attending', 'O0002', '2', 'Mr.', 'Brendon Low', 'SPARK PLANNERS', 'Managing Director', 'ITO', 'A1', 'SSWE', 'Test Remarks 123456', '2017-03-23 10:17:12', 0, NULL, 0, 0, 0),
(6, 8, 'Attending', '2', 'D0002', 'te', 'werwr', 'wrew', 'ertee', 'werw', 'rtr', 'werw', 'werww', '2017-05-12 16:12:58', 0, NULL, 0, 0, 0);

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

--
-- Table structure for table `tbl_registrant_attendance`
--

CREATE TABLE `tbl_registrant_attendance` (
  `attendance_id` int(11) NOT NULL,
  `session_id` int(11) NOT NULL,
  `registrant_id` int(11) NOT NULL,
  `attendance_datetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tbl_registrant_attendance`
--

INSERT INTO `tbl_registrant_attendance` (`attendance_id`, `session_id`, `registrant_id`, `attendance_datetime`) VALUES
(10, 1, 2, '2017-05-12 17:31:58'),
(8, 1, 1, '2017-05-12 15:47:17'),
(9, 2, 1, '2017-05-12 15:47:30'),
(11, 2, 2, '2017-05-12 17:32:05'),
(12, 1, 6, '2017-05-12 17:32:29'),
(13, 2, 6, '2017-05-12 17:32:33');

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

--
-- Table structure for table `tbl_role`
--

CREATE TABLE `tbl_role` (
  `role_id` int(11) NOT NULL,
  `role_name` varchar(100) NOT NULL,
  `role_prefix` varchar(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tbl_role`
--

INSERT INTO `tbl_role` (`role_id`, `role_name`, `role_prefix`) VALUES
(1, 'Silver', 'SV'),
(2, 'Gold', 'G'),
(3, 'Star', 'S'),
(4, 'Superstar', 'SS'),
(5, 'Hero Caregiver', 'H'),
(6, 'Hero Oatient', 'HO'),
(7, 'Guest', 'D'),
(8, 'Nominator', 'N'),
(9, 'Replace', 'R'),
(10, 'Walk-in', 'W');

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

--
-- Table structure for table `tbl_session`
--

CREATE TABLE `tbl_session` (
  `session_id` int(11) NOT NULL,
  `session_name` varchar(100) NOT NULL,
  `start` datetime NOT NULL,
  `end` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tbl_session`
--

INSERT INTO `tbl_session` (`session_id`, `session_name`, `start`, `end`) VALUES
(1, 'EHA Caring Awards 2017 (Test)', '2017-05-25 00:00:00', '2017-05-25 23:59:59'),
(2, 'EHA Caring Awards 2017', '2017-05-26 00:00:00', '2017-05-26 23:59:59');

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

--
-- Table structure for table `tbl_user`
--

CREATE TABLE `tbl_user` (
  `user_id` int(11) NOT NULL,
  `user_login` varchar(20) NOT NULL,
  `user_password` varchar(20) NOT NULL,
  `user_printer` int(11) NOT NULL DEFAULT '0',
  `user_admin` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tbl_user`
--

INSERT INTO `tbl_user` (`user_id`, `user_login`, `user_password`, `user_printer`, `user_admin`) VALUES
(1, 'spadmin1', 'spadmin1', 1, 0),
(2, 'spadmin2', 'spadmin2', 2, 0),
(3, 'spadmin3', 'spadmin3', 3, 0),
(4, 'spadmin4', 'spadmin4', 4, 0),
(5, 'spadmin5', 'spadmin5', 5, 0),
(6, 'spadmin6', 'spadmin6', 6, 0),
(7, 'spadmin7', 'spadmin7', 7, 0),
(8, 'spadmin8', 'spadmin8', 8, 0),
(10, 'spadmin9', 'spadmin9', 9, 0),
(11, 'spadmin10', 'spadmin10', 10, 0);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `tbl_email`
--
ALTER TABLE `tbl_email`
  ADD PRIMARY KEY (`email_id`);

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

--
-- Indexes for table `tbl_registrant`
--
ALTER TABLE `tbl_registrant`
  ADD PRIMARY KEY (`registrant_id`);

--
-- Indexes for table `tbl_registrant_attendance`
--
ALTER TABLE `tbl_registrant_attendance`
  ADD PRIMARY KEY (`attendance_id`);

--
-- Indexes for table `tbl_role`
--
ALTER TABLE `tbl_role`
  ADD PRIMARY KEY (`role_id`);

--
-- Indexes for table `tbl_session`
--
ALTER TABLE `tbl_session`
  ADD PRIMARY KEY (`session_id`);

--
-- Indexes for table `tbl_user`
--
ALTER TABLE `tbl_user`
  ADD PRIMARY KEY (`user_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `tbl_email`
--
ALTER TABLE `tbl_email`
  MODIFY `email_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `tbl_id`
--
ALTER TABLE `tbl_id`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `tbl_registrant`
--
ALTER TABLE `tbl_registrant`
  MODIFY `registrant_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `tbl_registrant_attendance`
--
ALTER TABLE `tbl_registrant_attendance`
  MODIFY `attendance_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
--
-- AUTO_INCREMENT for table `tbl_role`
--
ALTER TABLE `tbl_role`
  MODIFY `role_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `tbl_session`
--
ALTER TABLE `tbl_session`
  MODIFY `session_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `tbl_user`
--
ALTER TABLE `tbl_user`
  MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
