-- 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
(3, 'coneheads offer', 'geniteam', '', 'images/uploads/3487-5e7f2e8ff45b2e7c879e010041cc0d29.jpg', 'coneheads', 'images/uploads/7158-memcashe.png', 600, 20, 3, 100, 0, 0, '2016-08-01', 0, '', 5, 1, '0000-00-00 00:00:00', 'lahore', 1),
(4, 'Compaign 123', 'geniteam 1', '', 'images/uploads/user.png', '', 'images/uploads/user.png', 0, 0, 0, 0, 0, 0, '', 0, '', 5, 0, '0000-00-00 00:00:00', 'Lahore', 1),
(5, 'UsaTest HP Laptop', 'geniteam 2', '', 'images/uploads/campaigns_logo.png', '', 'images/uploads/logo.jpg', 0, 0, 0, 0, 0, 0, '', 0, '', 5, 0, '0000-00-00 00:00:00', 'lahore', 0),
(6, 'Iphone Text', 'geniteam 3', '', 'images/uploads/campaigns_logo.png', '', 'images/uploads/logo.jpg', 0, 0, 0, 0, 0, 0, '', 0, '', 5, 1, '0000-00-00 00:00:00', 'Lahore', 0),
(7, 'Tab Test', '', '', 'images/uploads/campaigns.png', '3', 'images/uploads/logo.jpg', 4, 5, 0, 6, 0, 0, '2016-08-04', 0, '', 0, 1, '0000-00-00 00:00:00', '7', 0),
(8, '500$', '', '', 'images/uploads/campaigns.png', '', 'images/uploads/logo.jpg', 0, 0, 0, 0, 0, 0, '', 0, '', 0, 0, '0000-00-00 00:00:00', '', 0),
(9, 'BMW Test', '', '', 'images/uploads/campaigns.png', '', 'images/uploads/logo.jpg', 0, 0, 0, 0, 0, 0, '', 0, '', 0, 0, '0000-00-00 00:00:00', '', 0),
(10, '60 Iphone6 Test', '', '', 'images/uploads/campaigns.png', '', 'images/uploads/logo.jpg', 0, 0, 0, 0, 0, 0, '', 0, '', 0, 0, '0000-00-00 00:00:00', '', 0),
(11, 'sdfsdf', '', '', 'images/uploads/campaigns.png', '', 'images/uploads/logo.jpg', 0, 0, 0, 0, 0, 0, '', 0, '', 0, 0, '0000-00-00 00:00:00', '', 0),
(12, 'asdasd', '', '', 'images/uploads/campaigns.png', '', 'images/uploads/logo.jpg', 0, 0, 0, 0, 0, 0, '', 0, '', 0, 0, '0000-00-00 00:00:00', '', 0),
(13, 'sadsa', 'desppp', '', 'images/uploads/campaigns.png', '', 'images/uploads/logo.jpg', 0, 0, 0, 0, 0, 0, '', 0, '', 0, 0, '0000-00-00 00:00:00', '', 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, 3, 3, 3, '2016-08-11 06:15:39', '2016-07-21 12:15:47'),
(29, 4, 3, 3, '2016-08-11 06:15:42', '2016-08-01 05:48:02');

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

--
-- 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
(15, 3, 3, 5, 5, '2016-08-11 06:37:44', '2016-08-11 06:37:44');

--
-- 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=14;
--
-- AUTO_INCREMENT for table `bw_campaigns_result_log`
--
ALTER TABLE `bw_campaigns_result_log`
  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;
--
-- 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=16;
