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




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

--
-- 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, 19, 20, 0, 0, '2016-09-26 17:15:47', 0, '', 30, 0, '0000-00-00 00:00:00', 'lahore', 0),
(18, 'Get free KFC Zinger Deal', 'Zinger free', '', 'images/uploads/1384-DealsDetail82.jpg', 'KFC', 'images/uploads/5903-1024px-KFC_logo.svg.png', 700, 10, 10, 100, 0, 0, '2016-09-29 17:15:47', 0, '', 10, 1, '0000-00-00 00:00:00', 'Lahore, Pakistan', 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_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'),
(37, 1, 18, 5, 5, '2016-08-19 11:56:20', '2016-08-19 11:56:20'),
(38, 1, 18, 1, 1, '2016-08-19 11:56:24', '2016-08-19 11:56:24'),
(39, 1, 18, 1, 1, '2016-08-19 11:56:29', '2016-08-19 11:56:29'),
(40, 1, 18, 6, 6, '2016-08-19 11:56:33', '2016-08-19 11:56:33'),
(41, 1, 18, 6, 6, '2016-08-19 11:56:35', '2016-08-19 11:56:35'),
(42, 1, 18, 5, 5, '2016-08-19 11:56:37', '2016-08-19 11:56:37'),
(43, 1, 17, 6, 6, '2016-08-19 12:00:19', '2016-08-19 12:00:19'),
(44, 1, 17, 6, 6, '2016-08-19 12:01:26', '2016-08-19 12:01:26'),
(45, 1, 17, 2, 2, '2016-08-26 10:38:58', '2016-08-26 10:38:58'),
(46, 1, 17, 2, 2, '2016-08-26 10:39:05', '2016-08-26 10:39:05'),
(47, 1, 17, 2, 2, '2016-08-26 10:50:25', '2016-08-26 10:50:25'),
(48, 1, 17, 2, 2, '2016-08-26 10:50:28', '2016-08-26 10:50:28'),
(49, 1, 17, 2, 2, '2016-08-26 10:50:44', '2016-08-26 10:50:44'),
(50, 1, 17, 2, 2, '2016-08-26 10:50:51', '2016-08-26 10:50:51'),
(51, 1, 17, 2, 2, '2016-08-26 10:51:46', '2016-08-26 10:51:46'),
(52, 1, 17, 5, 5, '2016-08-29 10:21:04', '2016-08-29 10:21:04'),
(53, 1, 17, 1, 1, '2016-08-29 11:40:19', '2016-08-29 11:40:19');

--
-- 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_player_slotbook_logs`
--
ALTER TABLE `bw_player_slotbook_logs`
  ADD PRIMARY KEY (`slotbook_Id`);
--
-- 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_player_slotbook_logs`
--
ALTER TABLE `bw_player_slotbook_logs`
  MODIFY `slotbook_Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=54;
