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




--
-- Database: `bigwheel`
--

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

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

CREATE TABLE `admin` (
  `id` int(11) NOT NULL,
  `Username` varchar(200) NOT NULL,
  `Password` varchar(200) NOT NULL,
  `updated_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

INSERT INTO `admin` (`id`, `Username`, `Password`, `updated_on`) VALUES
(1, 'admin', 'admin123', '2016-02-10 11:42:48');

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

--
-- Table structure for table `bw_campaigns`
--

CREATE TABLE `bw_campaigns` (
  `Campaign_Id` int(11) NOT NULL,
  `Campaign_Name` varchar(500) NOT NULL,
  `Campaign_Heading` varchar(500) NOT NULL,
  `Campaign_Heading2` varchar(500) NOT NULL,
  `campaignImgUrl` varchar(500) NOT NULL,
  `campaignCompanyName` varchar(500) NOT NULL,
  `campaignCompanyImg` varchar(500) NOT NULL,
  `Prize_Value` int(11) NOT NULL,
  `SLots_Cost` int(11) NOT NULL,
  `SLots_Book` int(11) NOT NULL,
  `Slots_Total` int(11) NOT NULL,
  `Latitude` double NOT NULL,
  `Longitude` double NOT NULL,
  `End_Time` varchar(500) NOT NULL,
  `Winner_Id` int(11) NOT NULL,
  `Winner_Name` varchar(500) NOT NULL,
  `Slots_PerUser` int(11) NOT NULL,
  `feactured` int(11) NOT NULL,
  `updated_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Address` varchar(500) NOT NULL,
  `is_Finish` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `bw_campaigns`
--

INSERT INTO `bw_campaigns` (`Campaign_Id`, `Campaign_Name`, `Campaign_Heading`, `Campaign_Heading2`, `campaignImgUrl`, `campaignCompanyName`, `campaignCompanyImg`, `Prize_Value`, `SLots_Cost`, `SLots_Book`, `Slots_Total`, `Latitude`, `Longitude`, `End_Time`, `Winner_Id`, `Winner_Name`, `Slots_PerUser`, `feactured`, `updated_date`, `Address`, `is_Finish`) VALUES
(15, 'Win 4 Cake Pieces', 'Yummy, sweet Cake Pieces', '', 'images/uploads/6698-5534-Lighthouse.jpg', 'Masooms Cafe', 'images/uploads/5601-6066-830-masooms-coffee-gulberg-iii-lahore.jpg', 600, 20, 4, 100, 0, 0, '2016-08-18 17:15:47', 0, '', 20, 1, '0000-00-00 00:00:00', '7Gulberg, Lahore, Pakistan', 1),
(16, 'Get free QMobile', 'QMobile offer Description', '', 'images/uploads/7042-4532-468-12.jpg', 'QMobile', 'images/uploads/746-6054-8757-690img.jpg', 600, 20, 5, 100, 0, 0, '2016-08-17 17:15:47', 0, '', 10, 0, '0000-00-00 00:00:00', 'lahore', 1),
(17, 'get free Iphone', 'Iphone Description', '', 'images/uploads/4046-8328-1356-maxresdefault.jpg', 'iphone', 'images/uploads/7975-9983-4511-iPhone-logo1.png', 1000, 500, 8, 20, 0, 0, '2016-08-26 17:15:47', 0, '', 10, 0, '0000-00-00 00:00:00', 'lahore', 0),
(18, 'Get free kfc deal', 'kfc deal', '', 'images/uploads/1384-DealsDetail82.jpg', 'KFC', 'images/uploads/5903-1024px-KFC_logo.svg.png', 700, 10, 4, 100, 0, 0, '2016-08-25 17:15:47', 0, '', 10, 0, '0000-00-00 00:00:00', 'lahore', 0);

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

--
-- Table structure for table `bw_campaigns_result_log`
--

CREATE TABLE `bw_campaigns_result_log` (
  `Id` int(11) NOT NULL,
  `Campaigns_Id` int(11) NOT NULL,
  `Winner_Id` int(11) NOT NULL,
  `Slot_Color` int(11) NOT NULL,
  `Updated_At` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Created_At` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `bw_campaigns_result_log`
--

INSERT INTO `bw_campaigns_result_log` (`Id`, `Campaigns_Id`, `Winner_Id`, `Slot_Color`, `Updated_At`, `Created_At`) VALUES
(28, 15, 1, 5, '2016-08-18 12:47:38', '2016-07-21 12:15:47'),
(29, 4, 3, 3, '2016-08-11 06:15:42', '2016-08-01 05:48:02'),
(30, 16, 3, 4, '2016-08-18 13:05:09', '2016-08-18 13:03:38');

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

--
-- Table structure for table `bw_players`
--

CREATE TABLE `bw_players` (
  `Player_Id` int(11) NOT NULL,
  `First_Name` varchar(500) NOT NULL,
  `Last_Name` varchar(500) NOT NULL,
  `Username` varchar(500) NOT NULL,
  `Image_URL` varchar(500) NOT NULL,
  `Email` varchar(500) NOT NULL,
  `Social_Type` varchar(500) NOT NULL,
  `Device_Token_ios` varchar(500) NOT NULL,
  `Device_Token_and` varchar(500) NOT NULL,
  `Latitude` double NOT NULL,
  `Longitude` double NOT NULL,
  `Address` varchar(500) NOT NULL,
  `Coins` int(11) NOT NULL,
  `Coins_per_day` int(11) NOT NULL,
  `Unique_Identifier` varchar(500) NOT NULL,
  `Coins_LastCollect_Date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Gender` varchar(500) NOT NULL,
  `Social_ID` varchar(500) NOT NULL,
  `Access_Token` varchar(500) NOT NULL,
  `Platform_Type` varchar(500) NOT NULL,
  `Device_Model` varchar(500) NOT NULL,
  `Is_Tutorial_Completed` int(11) NOT NULL,
  `OS_Version` varchar(500) NOT NULL,
  `Build_No` varchar(500) NOT NULL,
  `Updated_At` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `Created_At` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `bw_players`
--

INSERT INTO `bw_players` (`Player_Id`, `First_Name`, `Last_Name`, `Username`, `Image_URL`, `Email`, `Social_Type`, `Device_Token_ios`, `Device_Token_and`, `Latitude`, `Longitude`, `Address`, `Coins`, `Coins_per_day`, `Unique_Identifier`, `Coins_LastCollect_Date`, `Gender`, `Social_ID`, `Access_Token`, `Platform_Type`, `Device_Model`, `Is_Tutorial_Completed`, `OS_Version`, `Build_No`, `Updated_At`, `Created_At`) VALUES
(1, 'Jhon', 'Quentin', 'ali', 'http://img.com/487845.jpg', 'sdfsdf@gmail.com', '1', 'device token Ios', 'device token Android', 21.15, 21.25, '', 48500, 0, '12345', '2016-08-18 15:18:41', '', '', '', '', '', 0, '', '', '2016-07-15 07:00:09', '2016-07-15 07:00:09'),
(2, 'Jhon1', 'Quentin', 'ali', 'images/abc.png', 'sdf6ssdf@gmail.com', '2', 'device token Ios', 'device token Android', 21.15, 21.25, '', 20, 0, '123456', '2016-07-21 11:57:28', '', '', '', '', '', 0, '', '', '2016-07-15 07:50:01', '2016-07-15 07:50:01'),
(3, 'Jhon2', 'Quentin', 'ali', 'images/abc.png', 'sdf4234324323sdf@gmail.com', '2', 'device token Ios', 'device token Android', 21.15, 21.25, '', 14, 0, '123454444', '2016-07-21 11:57:31', '', '', '', '', '', 0, '', '', '2016-07-21 06:23:49', '2016-07-21 06:23:49'),
(4, 'Jhon3', 'Quentin', 'ali', 'images/abc.png', 's4234324323sdf@gmail.com', '2', 'device token Ios', 'device token Android', 21.15, 21.25, '', 0, 0, '12334223445444444', '2016-07-21 06:24:39', '', '', '', '', '', 0, '', '', '2016-07-21 06:24:05', '2016-07-21 06:24:05'),
(5, 'Jhon4', 'Quentin', 'ali', 'images/abc.png', 's4234323sdf@gmail.com', '2', 'device token Ios', 'device token Android', 21.15, 21.25, '', 0, 0, '123445444444', '2016-07-21 06:24:43', '', '', '', '', '', 0, '', '', '2016-07-21 06:24:10', '2016-07-21 06:24:10'),
(6, 'Jhon5', 'Quentin', 'ali', 'images/abc.png', 's4234sdf@gmail.com', '2', 'device token Ios', 'device token Android', 21.15, 21.25, '', 0, 0, '123445444', '2016-07-21 06:24:46', '', '', '', '', '', 0, '', '', '2016-07-21 06:24:17', '2016-07-21 06:24:17');

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

--
-- Table structure for table `bw_player_slotbook_logs`
--

CREATE TABLE `bw_player_slotbook_logs` (
  `slotbook_Id` int(11) NOT NULL,
  `Player_Id` int(11) NOT NULL,
  `Campaigns_Id` int(11) NOT NULL,
  `Slot_Color_Id` int(11) NOT NULL,
  `Slot_Color` int(11) NOT NULL,
  `Created_At` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Updated_At` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `bw_player_slotbook_logs`
--

INSERT INTO `bw_player_slotbook_logs` (`slotbook_Id`, `Player_Id`, `Campaigns_Id`, `Slot_Color_Id`, `Slot_Color`, `Created_At`, `Updated_At`) VALUES
(16, 1, 15, 5, 5, '2016-08-18 12:31:42', '2016-08-18 12:31:42'),
(17, 1, 15, 5, 5, '2016-08-18 12:31:42', '2016-08-18 12:31:42'),
(18, 1, 15, 5, 5, '2016-08-18 12:33:16', '2016-08-18 12:33:16'),
(19, 2, 15, 5, 5, '2016-08-18 12:53:44', '2016-08-18 12:53:44'),
(20, 1, 16, 4, 4, '2016-08-18 12:53:52', '2016-08-18 12:53:52'),
(21, 1, 16, 4, 4, '2016-08-18 12:53:55', '2016-08-18 12:53:55'),
(22, 1, 16, 4, 4, '2016-08-18 12:53:58', '2016-08-18 12:53:58'),
(23, 3, 16, 5, 5, '2016-08-18 13:02:33', '2016-08-18 13:02:33'),
(24, 1, 17, 4, 4, '2016-08-18 13:22:33', '2016-08-18 13:22:33'),
(25, 1, 17, 4, 4, '2016-08-18 13:22:36', '2016-08-18 13:22:36'),
(26, 1, 17, 4, 4, '2016-08-18 13:22:38', '2016-08-18 13:22:38'),
(27, 1, 18, 5, 5, '2016-08-18 13:25:34', '2016-08-18 13:25:34'),
(28, 1, 16, 5, 5, '2016-08-18 13:30:07', '2016-08-18 13:30:07'),
(29, 1, 18, 1, 1, '2016-08-18 15:03:20', '2016-08-18 15:03:20'),
(30, 1, 18, 1, 1, '2016-08-18 15:06:23', '2016-08-18 15:06:23'),
(31, 1, 18, 1, 1, '2016-08-18 15:06:39', '2016-08-18 15:06:39'),
(32, 1, 17, 4, 4, '2016-08-18 15:09:39', '2016-08-18 15:09:39'),
(33, 1, 17, 2, 2, '2016-08-18 15:18:15', '2016-08-18 15:18:15'),
(34, 1, 17, 2, 2, '2016-08-18 15:18:53', '2016-08-18 15:18:53'),
(35, 1, 17, 1, 1, '2016-08-18 15:19:14', '2016-08-18 15:19:14'),
(36, 1, 17, 1, 1, '2016-08-18 15:29:05', '2016-08-18 15:29:05');

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `bw_campaigns`
--
ALTER TABLE `bw_campaigns`
  ADD PRIMARY KEY (`Campaign_Id`);

--
-- Indexes for table `bw_campaigns_result_log`
--
ALTER TABLE `bw_campaigns_result_log`
  ADD PRIMARY KEY (`Id`);

--
-- Indexes for table `bw_players`
--
ALTER TABLE `bw_players`
  ADD PRIMARY KEY (`Player_Id`);

--
-- Indexes for table `bw_player_slotbook_logs`
--
ALTER TABLE `bw_player_slotbook_logs`
  ADD PRIMARY KEY (`slotbook_Id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `bw_campaigns`
--
ALTER TABLE `bw_campaigns`
  MODIFY `Campaign_Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
--
-- AUTO_INCREMENT for table `bw_campaigns_result_log`
--
ALTER TABLE `bw_campaigns_result_log`
  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;
--
-- AUTO_INCREMENT for table `bw_players`
--
ALTER TABLE `bw_players`
  MODIFY `Player_Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `bw_player_slotbook_logs`
--
ALTER TABLE `bw_player_slotbook_logs`
  MODIFY `slotbook_Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37;
