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

START TRANSACTION;



--
-- Database: `snaplimit_quiz4`
--

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

--
-- Table structure for table `admin_users`
--

CREATE TABLE `admin_users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `username` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password_changed_at` timestamp NULL DEFAULT NULL,
  `last_login_at` timestamp NULL DEFAULT NULL,
  `remember_token` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `admin_users`
--

INSERT INTO `admin_users` (`id`, `username`, `email`, `name`, `password`, `is_active`, `email_verified_at`, `password_changed_at`, `last_login_at`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'admin', 'admin@example.com', 'Administrator', '$2y$10$65RrLvcJiYkPqg8wy9snm.ubZbJe6160iEyogNk7vfV/ZznriDd0W', 1, '2025-06-28 12:46:33', NULL, NULL, '13a79911db3a1d6e8c53198240bd4af8d2e1a9825b80cf1405ec59c8dc646fd1', '2025-06-28 12:46:33', '2025-10-13 10:12:24');

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

--
-- Table structure for table `ads_settings`
--

CREATE TABLE `ads_settings` (
  `id` int(11) NOT NULL,
  `app_id` varchar(255) DEFAULT NULL,
  `interstitial_ad_unit` varchar(255) DEFAULT NULL,
  `native_ad_unit` varchar(255) DEFAULT NULL,
  `banner_ad_unit` varchar(255) DEFAULT NULL,
  `reward_ad_unit` varchar(255) DEFAULT NULL,
  `appopen_ad_unit` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ads_settings`
--

INSERT INTO `ads_settings` (`id`, `app_id`, `interstitial_ad_unit`, `native_ad_unit`, `banner_ad_unit`, `reward_ad_unit`, `appopen_ad_unit`, `created_at`, `updated_at`) VALUES
(1, 'ca-app-pub-7664893030317051~8013728480', '/21775744923/example/interstitial', '/21775744923/example/native-video', '/21775744923/example/adaptive-banner', '/21775744923/example/rewarded', '/21775744923/example/app-open', '2025-06-22 18:59:24', '2025-09-27 11:37:53');

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

--
-- Table structure for table `ad_controls`
--

CREATE TABLE `ad_controls` (
  `id` int(11) NOT NULL,
  `screen_name` enum('quiz','reward_screen','correct_spelling','image_puzzle','find_faster','math_check','app_open','sequence_puzzle','fact_finder','spelling_check','math_fun') NOT NULL,
  `interstitial_ad` tinyint(1) DEFAULT 1,
  `banner_ad` tinyint(1) DEFAULT 1,
  `native_ad` tinyint(1) DEFAULT 1,
  `reward_ad` tinyint(1) DEFAULT 1,
  `appopen_ad` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `ad_controls`
--

INSERT INTO `ad_controls` (`id`, `screen_name`, `interstitial_ad`, `banner_ad`, `native_ad`, `reward_ad`, `appopen_ad`, `created_at`) VALUES
(1, 'sequence_puzzle', 1, 0, 1, 1, 0, '2025-06-23 11:09:02'),
(2, 'fact_finder', 1, 0, 1, 1, 0, '2025-06-23 11:09:02'),
(3, 'spelling_check', 1, 0, 1, 1, 0, '2025-06-23 11:09:02'),
(4, 'math_fun', 1, 0, 0, 1, 0, '2025-06-23 11:09:02'),
(5, 'reward_screen', 0, 0, 1, 0, 1, '2025-06-23 11:09:02'),
(6, 'app_open', 0, 0, 0, 0, 1, '2025-06-23 11:09:02');

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

--
-- Table structure for table `app_settings`
--

CREATE TABLE `app_settings` (
  `id` int(11) NOT NULL DEFAULT 1,
  `claim_timer` int(11) DEFAULT 30,
  `website_task_enabled` tinyint(1) DEFAULT 0,
  `task_limits_enabled` tinyint(1) DEFAULT 1,
  `referrer_coins` int(11) DEFAULT 50,
  `referred_coins` int(11) DEFAULT 50,
  `referral_coin_threshold` int(11) DEFAULT 500,
  `daily_checkin_coins` int(11) DEFAULT 50,
  `app_link` varchar(255) DEFAULT '',
  `version` varchar(10) DEFAULT '1.0.0',
  `version_code` int(11) DEFAULT 1,
  `changelogs` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `maintenance_mode` tinyint(1) DEFAULT 0,
  `vpn_allowed` tinyint(1) DEFAULT 1,
  `how_to_link` varchar(255) DEFAULT '',
  `telegram_link` varchar(255) DEFAULT '',
  `support_link` varchar(255) DEFAULT '',
  `guest_mode` int(11) DEFAULT 0,
  `earning_mode` int(11) DEFAULT 1 COMMENT '(0 - OFF  1 - ON  2 - Check)',
  `gamezop_timer` int(11) DEFAULT 10,
  `app_base_url` varchar(255) DEFAULT NULL,
  `ad_app_size` int(11) DEFAULT NULL,
  `update_mode` varchar(10) DEFAULT 'off',
  `native_ad_load_refresh_count` int(11) DEFAULT 0,
  `gamezop_card_status` int(11) DEFAULT 1,
  `daily_withdraw_limit` int(11) DEFAULT 1,
  `rate_limit_count` int(11) DEFAULT 100,
  `upi_transfer_enable` int(11) DEFAULT 1,
  `delete_url` varchar(255) DEFAULT NULL,
  `packages` varchar(255) DEFAULT NULL,
  `privacy_policy_url` varchar(255) DEFAULT NULL,
  `gamezop_link` varchar(255) DEFAULT NULL,
  `close_APP` int(255) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `app_settings`
--

INSERT INTO `app_settings` (`id`, `claim_timer`, `website_task_enabled`, `task_limits_enabled`, `referrer_coins`, `referred_coins`, `referral_coin_threshold`, `daily_checkin_coins`, `app_link`, `version`, `version_code`, `changelogs`, `maintenance_mode`, `vpn_allowed`, `how_to_link`, `telegram_link`, `support_link`, `guest_mode`, `earning_mode`, `gamezop_timer`, `app_base_url`, `ad_app_size`, `update_mode`, `native_ad_load_refresh_count`, `gamezop_card_status`, `daily_withdraw_limit`, `rate_limit_count`, `upi_transfer_enable`, `delete_url`, `packages`, `privacy_policy_url`, `gamezop_link`, `close_APP`) VALUES
(1, 1, 0, 1, 200, 0, 200, 15, 'https://play.google.com/store/apps/details?id=com.socialquizpop.app', '3.0', 2, '<div style=\"font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 15px; background: #f9f9f9; border-radius: 8px; border: 1px solid #e0e0e0\">\r\n  <h3 style=\"color: #2a52be; margin-top: 0\">Quiz 2025 Update</h3>\r\n  <p>We\'ve made improvements to enhance your experience:</p>\r\n  \r\n  <h4 style=\"color: #2a52be; margin-bottom: 5px;\">New Features</h4>\r\n  <ul style=\"margin-top: 0\">\r\n    <li></li>\r\n    <li></li>\r\n  </ul>\r\n\r\n  <h4 style=\"color: #2a52be; margin-bottom: 5px;\">Bug Fixes</h4>\r\n  <ul style=\"margin-top: 0\">\r\n    <li>Fixed login issues on some devices</li>\r\n    <li>Improved ad loading stability</li>\r\n  </ul>\r\n\r\n  <p>Thanks for using <strong>QuizPop</strong>! Keep playing and earning.</p>\r\n</div>', 0, 1, 'https://www.youtube.com/', 'https://t.me/e', 'https://t.me/e', 1, 1, 5, 'https://quizpop.playexplore.in/beta_api/user/', 30, 'off', 5, 1, 2, 500, 0, 'https://docs.google.com/forms/d/e/1FAIpQLSdXyYnQIrcjL7c7t3UOz83WB-7yl7QRBoFfjQTf3_Bt_8Nmpg/viewform', 'com.phonepe.app,net.one97.paytm,konasl.nagad,com.dbbl.mbs.apps.main,com.bKash.customerapp,com.pubg.imobile,com.dts.freefiremax,com.dts.freefireth', 'https://quizpopapp.blogspot.com/p/quizpop-privacy-policy.html?m=1', 'https://www.gamezop.com/', 0);

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

--
-- Table structure for table `colour_guess_image_list`
--

CREATE TABLE `colour_guess_image_list` (
  `id` int(11) NOT NULL,
  `image_url` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `colour_guess_image_list`
--

INSERT INTO `colour_guess_image_list` (`id`, `image_url`) VALUES
(1, 'https://snaplimit.com/Assets/happy.png'),
(2, 'https://snaplimit.com/Assets/student.png'),
(3, 'https://snaplimit.com/Assets/gamer.png'),
(4, 'https://snaplimit.com/Assets/boy.png'),
(5, 'https://snaplimit.com/Assets/dog.png'),
(6, 'https://snaplimit.com/Assets/car.png'),
(7, 'https://snaplimit.com/Assets/tiger.png'),
(8, 'https://snaplimit.com/Assets/train.png'),
(9, 'https://snaplimit.com/Assets/bicycle.png'),
(10, 'https://snaplimit.com/Assets/monkey.png');

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

--
-- Table structure for table `daily_checkins`
--

CREATE TABLE `daily_checkins` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `coins_earned` int(11) NOT NULL,
  `claimed_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `claimed_date` date GENERATED ALWAYS AS (cast(`claimed_at` as date)) STORED
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `daily_checkins`
--

INSERT INTO `daily_checkins` (`id`, `user_id`, `coins_earned`, `claimed_at`) VALUES
(149, 2, 15, '2025-10-05 03:58:00'),
(150, 3, 15, '2025-10-05 04:56:42'),
(151, 4, 15, '2025-10-05 09:50:35'),
(152, 4, 15, '2025-10-09 16:14:51'),
(153, 9, 15, '2025-10-14 08:24:16'),
(154, 10, 15, '2025-11-05 09:57:45'),
(155, 11, 15, '2025-11-05 17:17:11'),
(156, 12, 15, '2025-11-10 11:29:12'),
(157, 11, 15, '2025-11-11 03:16:22'),
(158, 12, 15, '2025-11-11 11:11:59'),
(159, 13, 15, '2025-11-11 16:15:45'),
(160, 13, 15, '2025-11-12 04:55:26'),
(161, 12, 15, '2025-11-13 05:39:00'),
(162, 11, 15, '2025-11-13 07:30:44'),
(163, 13, 15, '2025-11-14 04:45:29'),
(164, 11, 15, '2025-11-14 16:37:05'),
(165, 13, 15, '2025-11-15 03:57:06'),
(166, 14, 15, '2025-11-16 06:46:45'),
(167, 15, 15, '2025-11-16 16:33:02'),
(168, 16, 15, '2025-11-17 15:45:13'),
(169, 12, 15, '2025-11-17 18:14:49'),
(170, 12, 15, '2025-11-18 07:28:18'),
(171, 16, 15, '2025-11-18 16:52:43');

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

--
-- Table structure for table `giftcodes`
--

CREATE TABLE `giftcodes` (
  `id` int(11) NOT NULL,
  `category_id` int(11) NOT NULL DEFAULT 1,
  `coins` int(11) NOT NULL DEFAULT 0,
  `code` varchar(255) NOT NULL,
  `pin` varchar(255) DEFAULT NULL,
  `is_used` tinyint(1) NOT NULL DEFAULT 0,
  `assigned_to` int(11) DEFAULT NULL,
  `assigned_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `giftcodes`
--

INSERT INTO `giftcodes` (`id`, `category_id`, `coins`, `code`, `pin`, `is_used`, `assigned_to`, `assigned_at`, `created_at`) VALUES
(60, 2, 700, 'FLIP-800-ABCD', '1234-5678-9012', 1, 11, '2025-11-13 07:33:17', '2025-06-27 20:49:14'),
(61, 2, 900, 'FLIP-900-EFGH', '2345-6789-0123', 0, 29, '2025-06-29 07:45:37', '2025-06-27 20:49:14'),
(62, 2, 1000, 'FLIP-1000-IJKL', '3456-7890-1234', 0, 22, '2025-06-28 18:22:06', '2025-06-27 20:49:14'),
(63, 2, 700, 'FLIP-700-MNOP', '4567-8901-2345', 1, 2, '2025-10-05 04:28:26', '2025-06-27 20:49:14'),
(64, 1, 800, 'GOOG-800-QRST', NULL, 1, 2, '2025-10-05 04:38:25', '2025-06-27 20:49:14'),
(65, 1, 900, 'GOOG-900-UVWX', NULL, 0, 29, '2025-06-29 07:46:06', '2025-06-27 20:49:14'),
(66, 1, 1000, 'GOOG-1000-YZAB', NULL, 0, 29, '2025-06-29 08:04:46', '2025-06-27 20:49:14'),
(67, 3, 800, 'AMZN-800-CDEF', NULL, 0, 22, '2025-06-28 18:21:50', '2025-06-27 20:49:14'),
(68, 3, 900, 'AMZN-900-GHIJ', NULL, 0, 29, '2025-06-29 07:44:46', '2025-06-27 20:49:14'),
(69, 3, 1000, 'AMZN-1000-KLMN', NULL, 0, 27, '2025-06-29 07:48:01', '2025-06-27 20:49:14');

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

--
-- Table structure for table `promo_codes`
--

CREATE TABLE `promo_codes` (
  `id` int(11) NOT NULL,
  `code` varchar(20) NOT NULL,
  `coins` int(11) NOT NULL,
  `usage_limit` int(11) NOT NULL,
  `expiry_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `promo_codes`
--

INSERT INTO `promo_codes` (`id`, `code`, `coins`, `usage_limit`, `expiry_date`, `created_at`) VALUES
(12, 'WELCOME', 50, 10000, '2025-12-09 18:30:00', '2025-07-03 08:30:00');

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

--
-- Table structure for table `promo_code_usage`
--

CREATE TABLE `promo_code_usage` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `promo_code_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `promo_code_usage`
--

INSERT INTO `promo_code_usage` (`id`, `user_id`, `promo_code_id`, `created_at`) VALUES
(13, 144, 12, '2025-07-11 12:48:52'),
(14, 3, 12, '2025-10-05 09:53:37'),
(16, 11, 12, '2025-11-11 11:31:26'),
(18, 12, 12, '2025-11-17 18:11:41');

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

--
-- Table structure for table `rate_limit`
--

CREATE TABLE `rate_limit` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `timestamp` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `rate_limit`
--

INSERT INTO `rate_limit` (`id`, `user_id`, `timestamp`) VALUES
(2196, 12, 1763483177),
(2197, 12, 1763483190),
(2198, 16, 1763483661),
(2199, 16, 1763483664),
(2200, 16, 1763483671),
(2201, 16, 1763483677),
(2202, 16, 1763484697),
(2203, 16, 1763484699),
(2204, 16, 1763484763),
(2205, 16, 1763484783);

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

--
-- Table structure for table `redeem_history`
--

CREATE TABLE `redeem_history` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `subcategory_id` int(11) NOT NULL,
  `image_url` varchar(255) DEFAULT NULL,
  `gift_code` varchar(255) DEFAULT NULL,
  `pin` varchar(255) DEFAULT NULL,
  `status` enum('pending','approved','rejected') DEFAULT 'pending',
  `rejection_reason` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `redeem_history`
--

INSERT INTO `redeem_history` (`id`, `user_id`, `subcategory_id`, `image_url`, `gift_code`, `pin`, `status`, `rejection_reason`, `created_at`) VALUES
(64, 148, 40, 'https://snaplimit.com/Assets/playstore.png', 'GOOG-800-QRST', NULL, 'approved', NULL, '2025-07-11 17:31:49'),
(65, 148, 34, 'https://snaplimit.com/Assets/flipkart.png', 'FLIP-700-MNOP', '4567-8901-2345', 'approved', NULL, '2025-07-11 17:33:17'),
(66, 11, 34, 'https://snaplimit.com/Assets/flipkart.png', 'FLIP-700-MNOP', '4567-8901-2345', 'approved', NULL, '2025-10-04 17:12:43'),
(67, 11, 40, 'https://snaplimit.com/Assets/playstore.png', 'GOOG-800-QRST', NULL, 'approved', NULL, '2025-10-04 17:13:27'),
(68, 12, 34, 'https://snaplimit.com/Assets/flipkart.png', 'FLIP-700-MNOP', '4567-8901-2345', 'approved', NULL, '2025-10-05 04:28:26'),
(69, 12, 40, 'https://snaplimit.com/Assets/playstore.png', 'GOOG-800-QRST', NULL, 'approved', NULL, '2025-10-05 04:38:25'),
(70, 11, 34, 'https://snaplimit.com/Assets/flipkart.png', 'FLIP-800-ABCD', '1234-5678-9012', 'approved', NULL, '2025-11-13 07:33:17');

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

--
-- Table structure for table `redeem_options_categories`
--

CREATE TABLE `redeem_options_categories` (
  `id` int(11) NOT NULL,
  `category_name` varchar(100) NOT NULL,
  `category_image_url` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `redeem_options_categories`
--

INSERT INTO `redeem_options_categories` (`id`, `category_name`, `category_image_url`, `created_at`) VALUES
(1, 'Google Gift Card', 'https://quiz4.snaplimit.com/Assets/google%20play.png', '2025-06-01 04:30:00'),
(2, 'Flipkart Voucher', 'https://quiz4.snaplimit.com/Assets/flipkartt.png', '2025-06-01 04:30:00'),
(3, 'Amazon Pay Gift', 'https://quiz4.snaplimit.com/Assets/amazon%20pay.png', '2025-06-01 04:30:00'),
(4, 'Upi Transfer', 'https://quiz4.snaplimit.com/Assets/Upi%20.png', '2025-06-13 07:47:50');

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

--
-- Table structure for table `redeem_options_subcategories`
--

CREATE TABLE `redeem_options_subcategories` (
  `id` int(11) NOT NULL,
  `category_id` int(11) NOT NULL,
  `sub_category_name` varchar(100) NOT NULL,
  `sub_category_image_url` varchar(255) NOT NULL,
  `coins` int(11) NOT NULL,
  `cash` decimal(10,2) NOT NULL,
  `is_enabled` tinyint(4) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `redeem_options_subcategories`
--

INSERT INTO `redeem_options_subcategories` (`id`, `category_id`, `sub_category_name`, `sub_category_image_url`, `coins`, `cash`, `is_enabled`, `created_at`) VALUES
(34, 2, 'flipkart voucher', 'https://snaplimit.com/Assets/flipkart.png', 700, 30.00, 1, '2025-06-01 04:30:00'),
(35, 2, 'flipkart voucher', 'https://snaplimit.com/Assets/flipkart.png', 5600, 50.00, 1, '2025-06-01 04:30:00'),
(36, 2, 'flipkart voucher', 'https://snaplimit.com/Assets/flipkart.png', 10200, 100.00, 1, '2025-06-01 04:30:00'),
(40, 1, 'google play gift', 'https://snaplimit.com/Assets/playstore.png', 800, 10.00, 1, '2025-06-01 04:30:00'),
(41, 3, 'amazon pay gift', 'https://snaplimit.com/Assets/amazon.png', 5600, 50.00, 1, '2025-06-01 04:30:00'),
(43, 3, 'amazon pay gift', 'https://snaplimit.com/Assets/amazon.png', 10200, 100.00, 1, '2025-06-01 04:30:00'),
(45, 1, 'google play gift', 'https://snaplimit.com/Assets/playstore.png', 2350, 20.00, 1, '2025-06-01 04:30:00'),
(46, 1, 'google play gift', 'https://snaplimit.com/Assets/playstore.png', 3400, 30.00, 1, '2025-06-01 04:30:00'),
(47, 1, 'google play gift', 'https://snaplimit.com/Assets/playstore.png', 5600, 50.00, 1, '2025-06-01 04:30:00');

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

--
-- Table structure for table `referral_rewards`
--

CREATE TABLE `referral_rewards` (
  `id` int(11) NOT NULL,
  `referrer_id` int(11) NOT NULL,
  `referred_id` int(11) NOT NULL,
  `referrer_coins` int(11) NOT NULL,
  `referred_coins` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `referral_rewards`
--

INSERT INTO `referral_rewards` (`id`, `referrer_id`, `referred_id`, `referrer_coins`, `referred_coins`, `created_at`) VALUES
(5, 135, 148, 200, 0, '2025-07-11 17:31:49');

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

--
-- Table structure for table `session_tokens`
--

CREATE TABLE `session_tokens` (
  `user_id` int(11) NOT NULL,
  `device_id` varchar(255) NOT NULL,
  `session_token` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `expires_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `session_tokens`
--

INSERT INTO `session_tokens` (`user_id`, `device_id`, `session_token`, `created_at`, `expires_at`) VALUES
(1, '344e7f848f0f4175', 'aa32470c94fb74f6ddd167e4f555f6d18fc6c87810ce207d8dfd559cd4c7857e', '2025-09-20 18:16:50', '2025-10-20 18:16:50'),
(2, '9466797c4541cb25', 'c9f1c12501461434a94a289c08846f12f4f9b3bed88f7406d4f521608facea2d', '2025-10-05 09:30:53', '2025-11-04 04:00:53'),
(3, 'c988b2276a45d589', 'f039e09b295295fa45944c9f4cf3547061141018c00b98687f7fe313d6f5c0ec', '2025-10-05 09:53:51', '2025-11-04 04:23:51'),
(4, '7f3f6e468a9ad8ce', '0c5135554760f05e28e8449bbf8bd2365f44643495458ff95102acd0d4d8d7d3', '2025-10-09 16:14:51', '2025-11-08 16:14:51'),
(5, 'cfbe54378fcd272d', '19e61297d9f0f95a686cb3dd0d4bbbeb27aa9d8076830f6b272bac4fbf2afae0', '2025-09-25 05:14:34', '2025-10-25 05:14:34'),
(6, '03fe41f11045d7b8', 'b4b0416a9e490d3a4ca01e4a4e1a734bf814ac773cfe66f106e2d31ea6a64f42', '2025-09-27 09:21:10', '2025-10-27 09:21:10'),
(7, 'ba44a8801e501cab', 'e4e931bcb9b34b0e3c1eba14268e53ebb45154168a9f7f22a91aa60a7d234e6d', '2025-09-30 11:02:37', '2025-10-30 11:02:37'),
(8, '3faa9eb45765f89e', 'f3bf6e9809a8eeeec32b7ad426588fe40ed1d12de2ba8cc77198c72c0856a750', '2025-09-28 18:16:36', '2025-10-28 18:16:36'),
(9, 'f8ec2b77ad9e2546', '3510ec76d036746204875d2d88be417004c62018a5553e9d3e45201135fae85a', '2025-10-14 11:18:52', '2025-11-13 11:18:52'),
(10, 'f8ec2b77ad9e2546', 'c0dae877679a70f7c0a97368be5f07a87090df63fdcfbdf749799d0983c1124a', '2025-11-05 11:24:00', '2025-12-05 05:54:00'),
(11, 'c988b2276a45d589', 'd7574dc70c4d9a637182d7deed5d7b769861fd676db722ef7481d9be716263fe', '2025-11-14 18:15:56', '2025-12-14 18:15:56'),
(12, '9466797c4541cb25', '31349033db3cd716906e6711e7dd421dae2186167bbe4ce32bbf3c397eeb7e08', '2025-11-18 16:26:30', '2025-12-18 16:26:30'),
(13, '7f3f6e468a9ad8ce', '5280c3066152b9c3526d73a3ce5ae163f7edb49568206dc7326abd45e8694dda', '2025-11-16 08:26:07', '2025-12-16 08:26:07'),
(14, 'cdaaafda07a6b14c', '2e79e3c9c8539beacc4c103412be18d7f6275f22d8e7fdb305323eccc2ce0751', '2025-11-17 21:17:52', '2025-12-17 15:47:52'),
(15, 'daa957b9f80434c6', 'c8f82734f0f1784a143fe95bfe39c7babeb4eb16a6a210faea25e459a4fa9fb3', '2025-11-16 16:33:56', '2025-12-16 16:33:56'),
(16, '23c7e6ebca0bb604', '3b343cdab0eaadb24f95a0ede3ae0a06abb52d614fd5273359beab3da2a873ad', '2025-11-18 16:53:03', '2025-12-18 16:53:03');

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

--
-- Table structure for table `tasks`
--

CREATE TABLE `tasks` (
  `id` int(11) NOT NULL,
  `task_type` enum('math_fun','spelling_check','fact_finder','sequence_puzzle') NOT NULL DEFAULT 'math_fun',
  `reward_coins` varchar(255) NOT NULL,
  `is_enabled` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `tasks`
--

INSERT INTO `tasks` (`id`, `task_type`, `reward_coins`, `is_enabled`, `created_at`, `updated_at`) VALUES
(1, 'math_fun', '10-20', 1, '2025-07-19 13:29:13', '2025-09-23 18:53:13'),
(2, 'spelling_check', '10-15', 1, '2025-07-19 13:29:13', '2025-09-23 18:53:19'),
(3, 'fact_finder', '5-10', 1, '2025-07-19 13:29:13', '2025-09-23 18:53:25'),
(4, 'sequence_puzzle', '12-25', 1, '2025-07-19 13:29:13', '2025-09-23 18:53:32');

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

--
-- Table structure for table `task_completions`
--

CREATE TABLE `task_completions` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `task_id` int(11) NOT NULL,
  `earned_coins` int(11) NOT NULL,
  `by_task` varchar(50) NOT NULL,
  `completed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `task_completions`
--

INSERT INTO `task_completions` (`id`, `user_id`, `task_id`, `earned_coins`, `by_task`, `completed_at`) VALUES
(1, 2, 4, 10, 'sequence_puzzle', '2025-09-23 16:59:07'),
(2, 2, 4, 10, 'sequence_puzzle', '2025-09-23 18:11:53'),
(3, 2, 4, 10, 'sequence_puzzle', '2025-09-23 18:27:44'),
(4, 2, 4, 10, 'sequence_puzzle', '2025-09-23 18:36:41'),
(5, 2, 4, 10, 'sequence_puzzle', '2025-09-23 18:44:05'),
(6, 2, 4, 25, 'sequence_puzzle', '2025-09-23 18:55:48'),
(7, 2, 4, 12, 'sequence_puzzle', '2025-09-23 19:01:04'),
(8, 2, 4, 18, 'sequence_puzzle', '2025-09-23 19:16:59'),
(9, 2, 4, 12, 'sequence_puzzle', '2025-09-23 19:20:20'),
(10, 2, 4, 22, 'sequence_puzzle', '2025-09-23 19:23:50'),
(11, 2, 4, 12, 'sequence_puzzle', '2025-09-23 19:31:32'),
(12, 2, 4, 21, 'sequence_puzzle', '2025-09-24 02:58:09'),
(13, 3, 4, 14, 'sequence_puzzle', '2025-09-24 03:27:40'),
(14, 3, 4, 22, 'sequence_puzzle', '2025-09-24 03:28:34'),
(15, 3, 3, 5, 'fact_finder', '2025-09-24 03:31:40'),
(16, 3, 1, 14, 'math_fun', '2025-09-24 06:49:01'),
(17, 3, 2, 15, 'spelling_check', '2025-09-24 06:50:18'),
(18, 3, 3, 7, 'fact_finder', '2025-09-24 07:29:16'),
(19, 4, 1, 10, 'math_fun', '2025-09-24 07:38:10'),
(20, 3, 1, 14, 'math_fun', '2025-09-24 10:28:04'),
(21, 3, 2, 15, 'spelling_check', '2025-09-24 10:28:53'),
(22, 3, 4, 18, 'sequence_puzzle', '2025-09-24 10:30:06'),
(23, 2, 2, 10, 'spelling_check', '2025-09-24 10:38:42'),
(24, 2, 2, 10, 'spelling_check', '2025-09-24 11:01:54'),
(25, 2, 2, 10, 'spelling_check', '2025-09-24 11:19:47'),
(26, 2, 4, 14, 'sequence_puzzle', '2025-09-24 11:32:20'),
(27, 2, 4, 17, 'sequence_puzzle', '2025-09-24 11:56:05'),
(28, 2, 1, 12, 'math_fun', '2025-09-24 12:12:50'),
(29, 2, 1, 13, 'math_fun', '2025-09-24 12:14:33'),
(30, 2, 1, 13, 'math_fun', '2025-09-24 12:18:29'),
(31, 3, 1, 18, 'math_fun', '2025-09-24 12:59:38'),
(32, 3, 1, 15, 'math_fun', '2025-09-24 12:59:49'),
(33, 3, 2, 13, 'spelling_check', '2025-09-24 13:00:42'),
(34, 3, 3, 7, 'fact_finder', '2025-09-24 13:03:50'),
(35, 3, 3, 6, 'fact_finder', '2025-09-24 13:04:15'),
(36, 5, 2, 15, 'spelling_check', '2025-09-24 17:22:06'),
(37, 3, 1, 16, 'math_fun', '2025-09-25 07:26:45'),
(38, 3, 4, 24, 'sequence_puzzle', '2025-09-25 07:27:27'),
(39, 3, 4, 21, 'sequence_puzzle', '2025-09-25 07:27:46'),
(40, 3, 3, 7, 'fact_finder', '2025-09-25 07:28:29'),
(41, 3, 3, 7, 'fact_finder', '2025-09-25 07:28:50'),
(42, 3, 3, 10, 'fact_finder', '2025-09-25 07:29:12'),
(43, 3, 1, 19, 'math_fun', '2025-09-25 07:32:11'),
(44, 3, 1, 13, 'math_fun', '2025-09-25 07:32:30'),
(45, 3, 2, 11, 'spelling_check', '2025-09-27 09:13:44'),
(46, 3, 2, 15, 'spelling_check', '2025-09-27 11:43:07'),
(47, 4, 2, 13, 'spelling_check', '2025-09-28 13:00:29'),
(48, 4, 1, 18, 'math_fun', '2025-09-28 13:01:36'),
(49, 4, 3, 6, 'fact_finder', '2025-09-28 13:02:43'),
(50, 4, 4, 19, 'sequence_puzzle', '2025-09-28 13:03:06'),
(51, 8, 2, 11, 'spelling_check', '2025-09-28 18:16:04'),
(52, 3, 3, 10, 'fact_finder', '2025-09-29 18:04:06'),
(53, 4, 2, 14, 'spelling_check', '2025-09-30 01:31:24'),
(54, 4, 1, 19, 'math_fun', '2025-09-30 01:31:45'),
(55, 4, 3, 5, 'fact_finder', '2025-09-30 01:32:13'),
(56, 3, 2, 15, 'spelling_check', '2025-09-30 03:37:41'),
(57, 3, 2, 12, 'spelling_check', '2025-09-30 03:37:51'),
(58, 3, 2, 14, 'spelling_check', '2025-09-30 03:38:02'),
(59, 3, 1, 19, 'math_fun', '2025-09-30 03:38:52'),
(60, 3, 1, 15, 'math_fun', '2025-09-30 03:39:01'),
(61, 3, 1, 15, 'math_fun', '2025-09-30 03:39:11'),
(62, 2, 2, 0, 'spelling_check', '2025-09-30 17:53:49'),
(63, 4, 3, 10, 'fact_finder', '2025-10-05 09:51:34'),
(64, 11, 4, 14, 'sequence_puzzle', '2025-11-11 03:22:13'),
(65, 11, 3, 9, 'fact_finder', '2025-11-11 05:42:03'),
(66, 11, 3, 10, 'fact_finder', '2025-11-11 05:53:41'),
(67, 13, 4, 14, 'sequence_puzzle', '2025-11-11 16:17:38'),
(68, 13, 4, 12, 'sequence_puzzle', '2025-11-12 05:07:36'),
(69, 12, 2, 15, 'spelling_check', '2025-11-13 06:25:07'),
(70, 12, 2, 15, 'spelling_check', '2025-11-13 06:35:10'),
(71, 11, 3, 8, 'fact_finder', '2025-11-13 06:53:53'),
(72, 11, 3, 9, 'fact_finder', '2025-11-13 06:54:34'),
(73, 13, 4, 18, 'sequence_puzzle', '2025-11-14 04:46:06'),
(74, 11, 3, 8, 'fact_finder', '2025-11-14 18:06:07'),
(75, 11, 3, 6, 'fact_finder', '2025-11-14 18:15:54'),
(76, 13, 4, 17, 'sequence_puzzle', '2025-11-15 03:57:39');

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

--
-- Table structure for table `task_limits`
--

CREATE TABLE `task_limits` (
  `id` int(11) NOT NULL,
  `task_type` enum('math_fun','spelling_check','fact_finder','sequence_puzzle') NOT NULL,
  `daily_limit` varchar(255) NOT NULL DEFAULT '10',
  `ad_index` int(11) NOT NULL,
  `important_ad_type` varchar(50) DEFAULT NULL COMMENT 'inter/native',
  `is_enabled` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `task_limits`
--

INSERT INTO `task_limits` (`id`, `task_type`, `daily_limit`, `ad_index`, `important_ad_type`, `is_enabled`, `created_at`, `updated_at`) VALUES
(1, 'math_fun', '5-10', 2, 'inter', 1, '2025-06-17 10:45:34', '2025-09-24 11:30:55'),
(2, 'spelling_check', '5-8', 2, 'native', 1, '2025-06-17 10:45:34', '2025-09-24 11:31:01'),
(3, 'fact_finder', '10-15', 3, 'native', 1, '2025-06-17 10:45:34', '2025-09-24 11:31:11'),
(4, 'sequence_puzzle', '15-20', 4, 'native', 1, '2025-06-17 10:45:34', '2025-09-24 11:31:17');

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

--
-- Table structure for table `task_questions`
--

CREATE TABLE `task_questions` (
  `id` int(11) NOT NULL,
  `task_id` int(11) NOT NULL,
  `question` varchar(255) DEFAULT NULL,
  `option_1` varchar(255) DEFAULT NULL,
  `option_2` varchar(255) DEFAULT NULL,
  `option_3` varchar(255) DEFAULT NULL,
  `option_4` varchar(255) DEFAULT NULL,
  `correct_option` varchar(255) DEFAULT NULL,
  `correctness_answer` enum('Yes','No') DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `task_questions`
--

INSERT INTO `task_questions` (`id`, `task_id`, `question`, `option_1`, `option_2`, `option_3`, `option_4`, `correct_option`, `correctness_answer`, `created_at`, `updated_at`) VALUES
(761, 1, 'Answer is 4', '2+2', '3-1', '5+2', '3-5', '2+2', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(762, 1, 'What is 5 + 3?', '7', '8', '6', '9', '8', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(763, 1, 'What is 10 - 2?', '8', '7', '9', '6', '8', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(764, 1, 'Answer is 10', '5+5', '12-1', '8+1', '7+2', '5+5', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(765, 1, 'What is 2 + 3?', '4', '6', '5', '3', '5', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(766, 1, 'What is 7 - 4?', '2', '3', '1', '5', '3', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(767, 1, 'Answer is 6', '3+3', '4+1', '10-5', '8-1', '3+3', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(768, 1, 'What is 9 + 1?', '10', '11', '8', '9', '10', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(769, 1, 'What is 6 - 5?', '1', '10', '4', '5', '1', NULL, '2025-10-31 20:58:36', '2025-11-10 10:59:45'),
(770, 1, 'Answer is 9', '4+4', '10-2', '6+3', '7+1', '6+3', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(771, 2, 'Find the letter \'A\'', 'b', 'B', 'a', 'D', 'a', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(772, 2, 'Find the letter \'b\'', 'b', 'd', 'p', 'q', 'b', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(773, 2, 'What comes after C?', 'D', 'E', 'B', 'A', 'D', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(774, 2, 'Find the letter \'G\'', 'g', 'j', 'y', 'p', 'g', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(775, 2, 'What is the lowercase of H?', 'h', 'H', 'j', 'J', 'h', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(776, 2, 'Find the letter \'M\'', 'n', 'm', 'w', 'v', 'm', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(777, 2, 'What comes before Z?', 'X', 'A', 'Y', 'W', 'Y', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(778, 2, 'What is the uppercase of f?', 'F', 'f', 'T', 't', 'F', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(779, 2, 'Find the letter \'R\'', 'P', 'R', 'K', 'S', 'R', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(780, 2, 'Find the letter \'e\'', 'e', 'c', 'f', 'a', 'e', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(781, 3, 'Which animal says \'Moo\'?', 'Cat', 'Dog', 'Cow', 'Sheep', 'Cow', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(782, 3, 'Which animal says \'Woof\'?', 'Dog', 'Pig', 'Horse', 'Cat', 'Dog', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(783, 3, 'Which animal says \'Meow\'?', 'Chicken', 'Cow', 'Cat', 'Duck', 'Cat', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(784, 3, 'Which animal says \'Oink\'?', 'Sheep', 'Pig', 'Goat', 'Lion', 'Pig', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(785, 3, 'Which animal says \'Baa\'?', 'Rooster', 'Frog', 'Sheep', 'Dog', 'Sheep', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(786, 3, 'Which animal says \'Quack\'?', 'Duck', 'Horse', 'Cat', 'Cow', 'Duck', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(787, 3, 'Which animal says \'Hiss\'?', 'Bird', 'Snake', 'Pig', 'Elephant', 'Snake', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(788, 3, 'Which animal says \'Ribbit\'?', 'Fish', 'Mouse', 'Frog', 'Chicken', 'Frog', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(789, 3, 'Which animal says \'Neigh\'?', 'Horse', 'Lion', 'Tiger', 'Bear', 'Horse', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(790, 3, 'Which animal says \'Chirp\'?', 'Dog', 'Pig', 'Bird', 'Snake', 'Bird', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(791, 4, 'Find a number bigger than 5', '4', '6', '3', '2', '6', NULL, '2025-10-31 20:58:36', '2025-11-11 03:21:35'),
(792, 4, 'Which number is bigger?', '7', '9', '2', '5', '9', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(793, 4, 'Which number is smaller?', '3', '5', '1', '8', '1', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(794, 4, 'Find a number smaller than 10', '12', '15', '9', '11', '9', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(795, 4, 'Which number is biggest?', '15', '25', '10', '20', '25', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(796, 4, 'Which number is smallest?', '100', '50', '75', '60', '50', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(797, 4, 'Which number is bigger than 50?', '45', '30', '55', '20', '55', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(798, 4, 'Which number is smaller than 20?', '21', '30', '19', '25', '19', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(799, 4, 'Which number is biggest?', '8', '2', '10', '5', '10', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36'),
(800, 4, 'Which number is smallest?', '7', '4', '6', '9', '4', NULL, '2025-10-31 20:58:36', '2025-10-31 20:58:36');

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

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

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `email` varchar(255) NOT NULL,
  `device_id` varchar(255) NOT NULL,
  `coins` int(11) DEFAULT 0,
  `refercode` varchar(8) NOT NULL,
  `referred_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `is_blocked` tinyint(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

INSERT INTO `users` (`id`, `email`, `device_id`, `coins`, `refercode`, `referred_by`, `created_at`, `is_blocked`) VALUES
(10, 'wostudyofficial@gmail.com', 'f8ec2b77ad9e2546', 555, 'wostkxGt', NULL, '2025-11-01 06:47:13', 0),
(11, 'sachinjangirrwr@gmail.com', 'c988b2276a45d589', 12344, 'sachCg79', NULL, '2025-11-05 17:01:17', 0),
(12, 'developer.yavansh@gmail.com', '9466797c4541cb25', 130, 'deven5Li', NULL, '2025-11-07 05:20:10', 0),
(13, 'droidskillspro@gmail.com', '7f3f6e468a9ad8ce', 121, 'droi1heP', NULL, '2025-11-11 16:15:39', 0),
(14, 'monikatestingstdev@gmail.com', 'cdaaafda07a6b14c', 15, 'moniXVnu', NULL, '2025-11-16 06:45:58', 0),
(15, 'kushagra.electron.me@gmail.com', 'daa957b9f80434c6', 15, 'kush4a8R', NULL, '2025-11-16 16:32:53', 0),
(16, 'princekumarkeshri.22@gmail.com', '23c7e6ebca0bb604', 30, 'prin2ToW', NULL, '2025-11-17 06:15:29', 0);

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

--
-- Table structure for table `user_task_usage`
--

CREATE TABLE `user_task_usage` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `task_type` enum('math_fun','spelling_check','fact_finder','sequence_puzzle') NOT NULL,
  `usage_date` date NOT NULL,
  `ad_index` int(11) DEFAULT NULL,
  `used_count` int(11) NOT NULL DEFAULT 0,
  `user_daily_limit` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `user_task_usage`
--

INSERT INTO `user_task_usage` (`id`, `user_id`, `task_type`, `usage_date`, `ad_index`, `used_count`, `user_daily_limit`, `created_at`, `updated_at`) VALUES
(72, 2, 'spelling_check', '2025-10-05', 2, 6, 6, '2025-10-05 03:59:18', '2025-10-05 04:01:29'),
(73, 2, 'fact_finder', '2025-10-05', 3, 14, 14, '2025-10-05 04:00:07', '2025-10-05 04:01:34'),
(74, 2, 'sequence_puzzle', '2025-10-05', 4, 20, 20, '2025-10-05 04:01:05', '2025-10-05 04:01:38'),
(75, 2, 'math_fun', '2025-10-05', 2, 7, 7, '2025-10-05 04:19:21', '2025-10-05 04:19:31'),
(76, 4, 'fact_finder', '2025-10-05', 3, 1, 14, '2025-10-05 09:51:24', '2025-10-05 09:51:34'),
(77, 4, 'sequence_puzzle', '2025-10-05', 4, 0, 17, '2025-10-05 09:51:49', '2025-10-05 09:51:49'),
(78, 9, 'sequence_puzzle', '2025-10-14', 4, 0, 18, '2025-10-14 07:45:25', '2025-10-14 07:45:25'),
(79, 10, 'sequence_puzzle', '2025-11-03', 4, 0, 16, '2025-11-03 16:00:58', '2025-11-03 16:00:58'),
(80, 10, 'sequence_puzzle', '2025-11-04', 4, 0, 20, '2025-11-04 13:18:41', '2025-11-04 13:18:41'),
(81, 10, 'sequence_puzzle', '2025-11-05', 4, 0, 18, '2025-11-05 11:19:32', '2025-11-05 11:19:32'),
(82, 11, 'sequence_puzzle', '2025-11-05', 4, 0, 16, '2025-11-05 17:17:18', '2025-11-05 17:17:18'),
(83, 11, 'spelling_check', '2025-11-05', 2, 0, 8, '2025-11-05 17:18:11', '2025-11-05 17:18:11'),
(84, 12, 'sequence_puzzle', '2025-11-10', 4, 0, 15, '2025-11-10 10:55:55', '2025-11-10 10:55:55'),
(85, 11, 'sequence_puzzle', '2025-11-11', 4, 1, 18, '2025-11-11 03:16:28', '2025-11-11 03:22:13'),
(86, 11, 'math_fun', '2025-11-11', 2, 0, 8, '2025-11-11 03:23:48', '2025-11-11 03:23:48'),
(87, 11, 'spelling_check', '2025-11-11', 2, 0, 5, '2025-11-11 05:40:02', '2025-11-11 05:40:02'),
(88, 11, 'fact_finder', '2025-11-11', 3, 2, 12, '2025-11-11 05:41:29', '2025-11-11 05:53:41'),
(89, 12, 'spelling_check', '2025-11-11', 2, 0, 6, '2025-11-11 10:55:07', '2025-11-11 10:55:07'),
(90, 13, 'sequence_puzzle', '2025-11-11', 4, 1, 17, '2025-11-11 16:15:50', '2025-11-11 16:17:38'),
(91, 13, 'fact_finder', '2025-11-11', 3, 0, 10, '2025-11-11 16:18:02', '2025-11-11 16:18:02'),
(92, 13, 'sequence_puzzle', '2025-11-12', 4, 1, 17, '2025-11-12 04:55:34', '2025-11-12 05:07:36'),
(93, 13, 'spelling_check', '2025-11-12', 2, 0, 5, '2025-11-12 05:09:17', '2025-11-12 05:09:17'),
(94, 12, 'fact_finder', '2025-11-13', 3, 0, 13, '2025-11-13 04:52:25', '2025-11-13 04:52:25'),
(95, 12, 'math_fun', '2025-11-13', 2, 0, 10, '2025-11-13 05:11:31', '2025-11-13 05:11:31'),
(96, 12, 'spelling_check', '2025-11-13', 2, 2, 5, '2025-11-13 06:24:45', '2025-11-13 06:35:10'),
(97, 11, 'fact_finder', '2025-11-13', 3, 15, 15, '2025-11-13 06:53:34', '2025-11-13 07:29:36'),
(98, 11, 'math_fun', '2025-11-13', 2, 10, 10, '2025-11-13 07:29:36', '2025-11-13 07:29:36'),
(99, 11, 'spelling_check', '2025-11-13', 2, 8, 8, '2025-11-13 07:29:36', '2025-11-13 07:29:36'),
(100, 11, 'sequence_puzzle', '2025-11-13', 4, 20, 20, '2025-11-13 07:29:36', '2025-11-13 07:29:36'),
(101, 13, 'sequence_puzzle', '2025-11-13', 4, 0, 15, '2025-11-13 13:54:38', '2025-11-13 13:54:38'),
(102, 13, 'sequence_puzzle', '2025-11-14', 4, 1, 16, '2025-11-14 04:45:38', '2025-11-14 04:46:06'),
(103, 13, 'spelling_check', '2025-11-14', 2, 0, 8, '2025-11-14 04:52:32', '2025-11-14 04:52:32'),
(104, 13, 'fact_finder', '2025-11-14', 3, 0, 15, '2025-11-14 04:53:03', '2025-11-14 04:53:03'),
(105, 11, 'spelling_check', '2025-11-14', 2, 0, 6, '2025-11-14 16:37:08', '2025-11-14 16:37:08'),
(106, 11, 'fact_finder', '2025-11-14', 3, 2, 11, '2025-11-14 18:01:57', '2025-11-14 18:15:54'),
(107, 13, 'sequence_puzzle', '2025-11-15', 4, 1, 20, '2025-11-15 03:57:11', '2025-11-15 03:57:39'),
(108, 13, 'fact_finder', '2025-11-15', 3, 0, 13, '2025-11-15 03:57:50', '2025-11-15 03:57:50'),
(109, 13, 'math_fun', '2025-11-15', 2, 0, 6, '2025-11-15 03:57:52', '2025-11-15 03:57:52'),
(110, 13, 'spelling_check', '2025-11-15', 2, 0, 8, '2025-11-15 03:57:55', '2025-11-15 03:57:55'),
(111, 14, 'fact_finder', '2025-11-16', 3, 0, 11, '2025-11-16 06:47:02', '2025-11-16 06:47:02'),
(112, 13, 'sequence_puzzle', '2025-11-16', 4, 20, 20, '2025-11-16 08:24:26', '2025-11-16 08:25:57'),
(113, 13, 'math_fun', '2025-11-16', 2, 10, 10, '2025-11-16 08:25:57', '2025-11-16 08:25:57'),
(114, 13, 'spelling_check', '2025-11-16', 2, 8, 8, '2025-11-16 08:25:57', '2025-11-16 08:25:57'),
(115, 13, 'fact_finder', '2025-11-16', 3, 15, 15, '2025-11-16 08:25:57', '2025-11-16 08:25:57'),
(116, 15, 'sequence_puzzle', '2025-11-16', 4, 0, 16, '2025-11-16 16:33:27', '2025-11-16 16:33:27'),
(117, 16, 'fact_finder', '2025-11-17', 3, 0, 15, '2025-11-17 06:17:59', '2025-11-17 06:17:59'),
(118, 16, 'fact_finder', '2025-11-18', 3, 0, 14, '2025-11-18 15:37:58', '2025-11-18 15:37:58'),
(119, 16, 'sequence_puzzle', '2025-11-18', 4, 0, 19, '2025-11-18 15:38:40', '2025-11-18 15:38:40');

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

--
-- Table structure for table `website_visit_tasks`
--

CREATE TABLE `website_visit_tasks` (
  `id` int(11) NOT NULL,
  `web_url` varchar(255) NOT NULL,
  `timer` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `website_visit_tasks`
--

INSERT INTO `website_visit_tasks` (`id`, `web_url`, `timer`, `created_at`) VALUES
(1, 'https://www.google.com', 10, '2025-06-14 06:36:13'),
(2, 'https://www.flaticon.com/search?word=plus-circle', 10, '2025-06-14 17:39:22');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `admin_users`
--
ALTER TABLE `admin_users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `username` (`username`),
  ADD UNIQUE KEY `email` (`email`);

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

--
-- Indexes for table `ad_controls`
--
ALTER TABLE `ad_controls`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `screen_name` (`screen_name`);

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

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

--
-- Indexes for table `daily_checkins`
--
ALTER TABLE `daily_checkins`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_user_date` (`user_id`,`claimed_date`),
  ADD KEY `idx_user_date` (`user_id`,`claimed_at`),
  ADD KEY `idx_claimed_at` (`claimed_at`);

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

--
-- Indexes for table `promo_codes`
--
ALTER TABLE `promo_codes`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `code` (`code`),
  ADD KEY `idx_promo_code` (`code`);

--
-- Indexes for table `promo_code_usage`
--
ALTER TABLE `promo_code_usage`
  ADD PRIMARY KEY (`id`),
  ADD KEY `promo_code_id` (`promo_code_id`),
  ADD KEY `idx_promo_usage` (`user_id`,`promo_code_id`);

--
-- Indexes for table `rate_limit`
--
ALTER TABLE `rate_limit`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_rate_limit_user` (`user_id`,`timestamp`);

--
-- Indexes for table `redeem_history`
--
ALTER TABLE `redeem_history`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `subcategory_id` (`subcategory_id`);

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

--
-- Indexes for table `redeem_options_subcategories`
--
ALTER TABLE `redeem_options_subcategories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `category_id` (`category_id`);

--
-- Indexes for table `referral_rewards`
--
ALTER TABLE `referral_rewards`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `referrer_id` (`referrer_id`,`referred_id`),
  ADD KEY `referred_id` (`referred_id`);

--
-- Indexes for table `session_tokens`
--
ALTER TABLE `session_tokens`
  ADD PRIMARY KEY (`user_id`,`device_id`);

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

--
-- Indexes for table `task_completions`
--
ALTER TABLE `task_completions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `task_id` (`task_id`),
  ADD KEY `completed_at` (`completed_at`);

--
-- Indexes for table `task_limits`
--
ALTER TABLE `task_limits`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `task_type` (`task_type`);

--
-- Indexes for table `task_questions`
--
ALTER TABLE `task_questions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `task_id` (`task_id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `email` (`email`),
  ADD UNIQUE KEY `device_id` (`device_id`),
  ADD UNIQUE KEY `refercode` (`refercode`),
  ADD KEY `referred_by` (`referred_by`),
  ADD KEY `idx_refercode` (`refercode`);

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

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `daily_checkins`
--
ALTER TABLE `daily_checkins`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=172;

--
-- AUTO_INCREMENT for table `giftcodes`
--
ALTER TABLE `giftcodes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=70;

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

--
-- AUTO_INCREMENT for table `promo_code_usage`
--
ALTER TABLE `promo_code_usage`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `rate_limit`
--
ALTER TABLE `rate_limit`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2206;

--
-- AUTO_INCREMENT for table `redeem_history`
--
ALTER TABLE `redeem_history`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=71;

--
-- AUTO_INCREMENT for table `referral_rewards`
--
ALTER TABLE `referral_rewards`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `task_completions`
--
ALTER TABLE `task_completions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=77;

--
-- AUTO_INCREMENT for table `task_questions`
--
ALTER TABLE `task_questions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=801;

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

--
-- AUTO_INCREMENT for table `user_task_usage`
--
ALTER TABLE `user_task_usage`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=120;
COMMIT;

