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

START TRANSACTION;



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

--
-- Table structure for table `city_master`
--

CREATE TABLE `city_master` (
  `id` int(9) NOT NULL,
  `city_name` varchar(200) DEFAULT NULL,
  `state` varchar(200) DEFAULT NULL,
  `country` varchar(200) DEFAULT NULL,
  `zip_code` varchar(200) DEFAULT NULL,
  `date_time` datetime DEFAULT NULL,
  `status` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `city_master`
--

INSERT INTO `city_master` (`id`, `city_name`, `state`, `country`, `zip_code`, `date_time`, `status`) VALUES
(1, 'Pune', 'Maharashtra', 'India', '38105', '2019-09-19 23:15:46', NULL),
(2, 'Mumbai', 'Maharashtra', 'India', '401107', '2019-10-01 12:08:55', NULL),
(3, 'Aurangabaz', 'Maharashtra', 'India', '1010', '2019-11-11 09:01:03', NULL);

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

--
-- Table structure for table `games`
--

CREATE TABLE `games` (
  `id` int(9) NOT NULL,
  `game_title` varchar(200) DEFAULT NULL,
  `game_date` varchar(20) DEFAULT NULL,
  `game_time` varchar(20) DEFAULT NULL,
  `date_time` datetime DEFAULT NULL,
  `status` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `games`
--

INSERT INTO `games` (`id`, `game_title`, `game_date`, `game_time`, `date_time`, `status`) VALUES
(1, 'Tambola Game 1', '2020-04-25', '16:30', '2020-04-25 16:38:53', NULL);

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

--
-- Table structure for table `game_tickets`
--

CREATE TABLE `game_tickets` (
  `id` int(9) NOT NULL,
  `name` varchar(10) DEFAULT NULL,
  `ticket_structure` text,
  `date_time` datetime DEFAULT NULL,
  `status` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `game_tickets`
--

INSERT INTO `game_tickets` (`id`, `name`, `ticket_structure`, `date_time`, `status`) VALUES
(1, 'T1', '[[1,0,25,31,0,56,0,70,0],[0,10,29,0,40,0,65,0,88],[4,13,0,38,0,59,0,73,46]]', NULL, NULL),
(2, 'T2', '[[3,0,0,36,0,50,61,0,82],[0,11,20,0,45,0,67,0,86],[6,0,27,0,48,58,0,72,0]]', NULL, NULL),
(3, 'T3', '[[0,17,0,32,0,54,0,75,84],[8,0,22,39,0,0,60,0,90],[0,19,24,0,42,0,63,77,0]]', NULL, NULL),
(4, 'T4', '[[2,0,26,0,41,0,66,0,81],[0,12,0,37,0,57,0,71,87],[5,0,28,0,46,0,68,0,89]]', NULL, NULL),
(5, 'T5', '[[0,15,0,33,43,0,64,76,0],[7,0,23,0,47,51,0,78,0],[0,18,0,35,0,53,69,0,85]]', NULL, NULL),
(6, 'T6', '[[0,14,0,30,0,52,0,74,80],[9,0,21,0,44,55,0,79,0],[0,16,0,34,49,0,62,0,83]]', NULL, NULL),
(7, 'T7', '[[0,17,23,0,42,54,0,0,85],[4,0,27,30,0,58,0,74,0],[8,0,0,33,44,0,62,0,87]]', NULL, NULL),
(8, 'T8', '[[6,0,28,0,46,0,66,71,0],[9,10,0,32,0,50,0,73,0],[0,14,0,35,0,52,0,77,89]]', NULL, NULL),
(9, 'T9', '[[0,0,20,0,43,53,0,75,81],[0,19,0,36,0,56,61,0,84],[2,0,24,0,49,0,64,0,88]]', NULL, NULL),
(10, 'T10', '[[1,0,25,0,45,0,67,70,0],[0,12,0,37,0,51,60,0,90],[3,15,0,39,0,55,0,76,0]]', NULL, NULL),
(11, 'T11', '[[0,11,0,34,40,0,65,72,0],[7,13,0,38,0,59,61,0,82],[0,18,21,0,47,0,68,0,78]]', NULL, NULL),
(12, 'T12', '[[0,16,22,0,41,0,60,0,80],[5,0,26,0,48,0,63,0,83],[0,0,29,31,0,57,0,79,86]]', NULL, NULL);

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

--
-- Table structure for table `ticket_rates`
--

CREATE TABLE `ticket_rates` (
  `id` int(9) NOT NULL,
  `game` varchar(200) DEFAULT NULL,
  `ticket_rate` varchar(20) DEFAULT NULL,
  `early_five_price` varchar(20) DEFAULT NULL,
  `lines_three_price` varchar(20) DEFAULT NULL,
  `full_house_price` varchar(20) DEFAULT NULL,
  `total_players` varchar(20) DEFAULT NULL,
  `date_time` datetime DEFAULT NULL,
  `status` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ticket_rates`
--

INSERT INTO `ticket_rates` (`id`, `game`, `ticket_rate`, `early_five_price`, `lines_three_price`, `full_house_price`, `total_players`, `date_time`, `status`) VALUES
(1, 'Tambola Game 1', '10', '13', '15', '20', '100', '2020-04-23 18:32:48', NULL),
(2, 'Tambola Game 1', '20', '25', '27', '30', '200', '2020-04-23 18:33:08', NULL);

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

--
-- Table structure for table `ticket_sale`
--

CREATE TABLE `ticket_sale` (
  `id` int(9) NOT NULL,
  `game_id` int(9) DEFAULT NULL,
  `user_id` int(9) DEFAULT NULL,
  `ticket_id` int(9) DEFAULT NULL,
  `ticket_rate` varchar(20) DEFAULT NULL,
  `qty` varchar(20) DEFAULT NULL,
  `total_amount` varchar(20) DEFAULT NULL,
  `game_ticket_id` int(9) DEFAULT NULL,
  `date_time` datetime DEFAULT NULL,
  `status` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ticket_sale`
--

INSERT INTO `ticket_sale` (`id`, `game_id`, `user_id`, `ticket_id`, `ticket_rate`, `qty`, `total_amount`, `game_ticket_id`, `date_time`, `status`) VALUES
(14, 1, 1, 1, '10', '1', '10', 1, '2020-04-25 16:32:05', NULL);

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

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

CREATE TABLE `users` (
  `id` int(9) NOT NULL,
  `name` varchar(50) DEFAULT NULL,
  `mobile` varchar(50) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `image` varchar(200) DEFAULT NULL,
  `city` varchar(50) DEFAULT NULL,
  `wallet_amount` varchar(20) DEFAULT NULL,
  `date_time` datetime DEFAULT NULL,
  `status` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

INSERT INTO `users` (`id`, `name`, `mobile`, `email`, `image`, `city`, `wallet_amount`, `date_time`, `status`) VALUES
(1, 'arbaz shaikh', '7776874241', 'softdream.a@gmail.com', 'outdoor.jpg', 'Mumbai', '30', '2020-04-23 12:04:29', NULL),
(2, 'arbaz shaikh', '9922144386', '', '1587623669electrical.jpg', 'Mumbai', '80', '2020-04-23 12:04:29', NULL);

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

--
-- Table structure for table `wallet_transaction`
--

CREATE TABLE `wallet_transaction` (
  `id` int(9) NOT NULL,
  `user_id` int(9) DEFAULT NULL,
  `type` varchar(200) DEFAULT NULL,
  `amount` varchar(200) DEFAULT NULL,
  `description` varchar(5000) DEFAULT NULL,
  `payment_id` varchar(200) DEFAULT NULL,
  `date_time` datetime DEFAULT NULL,
  `status` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `wallet_transaction`
--

INSERT INTO `wallet_transaction` (`id`, `user_id`, `type`, `amount`, `description`, `payment_id`, `date_time`, `status`) VALUES
(1, 2, 'credit', '100', 'Amount transfered by 7776874241', 'TRNF001587707130', '2020-04-24 11:15:30', NULL),
(2, 1, 'debit', '100', 'Amount transfered to 9922144386', 'TRNF001587707130', '2020-04-24 11:15:30', NULL),
(3, 1, 'credit', '20', 'Amount transfered by 9922144386', 'TRNF001587707358', '2020-04-24 11:19:18', NULL),
(4, 2, 'debit', '20', 'Amount transfered to 7776874241', 'TRNF001587707358', '2020-04-24 11:19:18', NULL),
(5, 1, 'debit', '10', 'Ticket Purchased. Ticket ID: TCKT0003', 'TRWL001587710817', '2020-04-24 12:16:57', NULL),
(6, 1, 'debit', '20', 'Ticket Purchased. Ticket ID: TCKT0004', 'TRWL001587796797', '2020-04-25 12:09:57', NULL),
(7, 1, 'debit', '10', 'Ticket Purchased. Ticket ID: TCKT00014', 'TRWL001587812530', '2020-04-25 16:32:10', NULL),
(8, 1, 'debit', '20', 'Ticket Purchased. Ticket ID: TCKT00015', 'TRWL001587812587', '2020-04-25 16:33:07', NULL);

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `city_master`
--
ALTER TABLE `city_master`
  MODIFY `id` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `games`
--
ALTER TABLE `games`
  MODIFY `id` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `game_tickets`
--
ALTER TABLE `game_tickets`
  MODIFY `id` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `ticket_rates`
--
ALTER TABLE `ticket_rates`
  MODIFY `id` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `ticket_sale`
--
ALTER TABLE `ticket_sale`
  MODIFY `id` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `wallet_transaction`
--
ALTER TABLE `wallet_transaction`
  MODIFY `id` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
COMMIT;

