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




--
-- Database: `clickinity`
--

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

--
-- Table structure for table `app_details`
--

CREATE TABLE `app_details` (
  `current_counter` int(11) DEFAULT NULL,
  `next_winning_number` int(11) DEFAULT NULL,
  `next_community_goal` int(11) DEFAULT NULL,
  `last_winner_id` int(11) DEFAULT NULL,
  `last_winning_number` int(11) DEFAULT NULL,
  `last_winning_community_goal` int(11) DEFAULT NULL,
  `next_hidden_goal` int(11) DEFAULT NULL,
  `id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `app_details`
--

INSERT INTO `app_details` (`current_counter`, `next_winning_number`, `next_community_goal`, `last_winner_id`, `last_winning_number`, `last_winning_community_goal`, `next_hidden_goal`, `id`) VALUES
(2234, 60, 6000, NULL, NULL, NULL, NULL, 1);

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

--
-- Table structure for table `rewards`
--

CREATE TABLE `rewards` (
  `id` int(11) NOT NULL,
  `reward` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `level` int(11) DEFAULT NULL,
  `username` varchar(50) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `password` varchar(50) DEFAULT NULL,
  `music` int(11) DEFAULT NULL,
  `total_clicks` int(11) DEFAULT NULL,
  `available_clicks` int(11) DEFAULT NULL,
  `sound` int(11) DEFAULT NULL,
  `device_token` varchar(50) DEFAULT NULL,
  `user_type` int(11) DEFAULT NULL,
  `port` int(11) DEFAULT NULL,
  `won_milestone` int(11) DEFAULT NULL,
  `won_milestone_time` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `level`, `username`, `email`, `password`, `music`, `total_clicks`, `available_clicks`, `sound`, `device_token`, `user_type`, `port`, `won_milestone`, `won_milestone_time`) VALUES
(1, 1, 'sinneiko', 'sajawal.sohail@geniteam.com', 'mypass', NULL, 123, 33, NULL, '123123123', NULL, NULL, NULL, NULL),
(2, NULL, 'miracle', 'user@email.com', 'abc123', 1, 1000, NULL, 1, '123123123', 1, NULL, NULL, NULL),
(3, NULL, 'abc', 'user@email.com', 'abc123', 1, 12, NULL, 1, '123123123', 1, NULL, NULL, NULL),
(4, NULL, 'ab1c', 'user@email.com', 'abc123', 1, 111, NULL, 1, '123123123', 1, NULL, NULL, NULL),
(5, NULL, 'ab1c2', 'user@email.com', 'abc123', 1, 1111, NULL, 1, '123123123', 1, NULL, NULL, NULL),
(6, NULL, 'ab1c23', 'user@email.com', 'abc123', 1, 33, NULL, 1, '123123123', 1, NULL, NULL, NULL),
(7, NULL, 'ab1c234', 'user@email.com', 'abc123', 1, 212, NULL, 1, '123123123', 1, NULL, NULL, NULL),
(8, NULL, '123ab1c234', 'user@email.com', 'abc123', 1, 45, NULL, 1, '123123123', 1, NULL, NULL, NULL),
(9, NULL, '123a2b1c234', 'user@email.com', 'abc123', 1, 555, NULL, 1, '123123123', 1, NULL, NULL, NULL),
(10, NULL, '123a2b1123c234', 'user@email.com', 'abc123', 1, 50, NULL, 1, '123123123', 1, NULL, NULL, NULL),
(11, NULL, '123a2b13123c234', 'user@email.com', 'abc123', 1, 78, NULL, 1, '123123123', 1, NULL, NULL, NULL),
(12, NULL, '123a2b13123c234a', 'user@email.com', 'abc123', 1, 45, NULL, 1, '123123123', 1, NULL, NULL, NULL),
(13, NULL, '123a2b13123c234aa', 'user@email.com', 'abc123', 1, 98, NULL, 1, '123123123', 1, NULL, NULL, NULL),
(14, NULL, '123a2b13123c234asa', 'user@email.com', 'abc123', 1, 555, NULL, 1, '123123123', 1, NULL, NULL, NULL),
(15, NULL, '123a2b13123c234asad', 'user@email.com', 'abc123', 1, 66, NULL, 1, '123123123', 1, NULL, NULL, NULL),
(16, NULL, '123a2b13123c234asadff', 'user@email.com', 'abc123', 1, 75, NULL, 1, '123123123', 1, NULL, NULL, NULL),
(17, NULL, '123a2b13123fc234asadff', 'user@email.com', 'abc123', 1, 75, NULL, 1, '123123123', 1, NULL, NULL, NULL),
(18, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 51, NULL, NULL),
(19, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 51, NULL, NULL),
(20, NULL, 'kk', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(21, NULL, 'fuck', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(22, NULL, 'dota', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(23, NULL, 'dota', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(24, NULL, 'dota', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(25, NULL, 'abc111', 'user@email.com', 'abc123', 1, NULL, NULL, 1, '123123123', 1, NULL, NULL, NULL),
(26, NULL, 'QWE', 'QWE@GMAIL.COM', '123', 1, NULL, NULL, 1, '', 1, NULL, NULL, NULL),
(27, NULL, 'zxc', 'zxc', 'zxc', 1, NULL, NULL, 1, '', 1, 121, NULL, NULL),
(28, NULL, 'asd', 'asd', 'asd', 1, NULL, NULL, 1, '', 1, 127, NULL, NULL);

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

--
-- Table structure for table `winners`
--

CREATE TABLE `winners` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `milestone` double DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `reward_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `winning_stages`
--

CREATE TABLE `winning_stages` (
  `id` int(11) NOT NULL,
  `clicks` int(11) DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `reward_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `winning_stages`
--

INSERT INTO `winning_stages` (`id`, `clicks`, `type`, `reward_id`) VALUES
(1, 1, 1, NULL),
(2, 50, 1, NULL),
(3, 100, 1, NULL),
(4, 500, 1, NULL),
(5, 1000, 1, NULL),
(6, 5000, 1, NULL),
(7, 10000, 1, NULL),
(8, 50000, 1, NULL),
(9, 100000, 1, NULL),
(10, 500000, 1, NULL),
(11, 1000000, 1, NULL),
(12, 5000000, 1, NULL),
(13, 10000000, 1, NULL);

--
-- Indexes for dumped tables
--

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

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `app_details`
--
ALTER TABLE `app_details`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;
--
-- AUTO_INCREMENT for table `winners`
--
ALTER TABLE `winners`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `winning_stages`
--
ALTER TABLE `winning_stages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
