-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 19 Haz 2025, 13:08:33
-- Sunucu sürümü: 10.4.32-MariaDB
-- PHP Sürümü: 8.0.30

START TRANSACTION;



--
-- Veritabanı: `slot_game`
--

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

--
-- Tablo için tablo yapısı `balance_logs`
--

CREATE TABLE `balance_logs` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `ticket_change` decimal(10,2) NOT NULL,
  `pap_change` decimal(10,2) NOT NULL,
  `note` text DEFAULT NULL,
  `admin_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `balance_logs`
--

INSERT INTO `balance_logs` (`id`, `user_id`, `ticket_change`, `pap_change`, `note`, `admin_id`, `created_at`) VALUES
(1, 1013, 50.00, 10.00, 'deneme', 1, '2025-06-13 23:35:19'),
(2, 1013, 50.00, 10.00, 'deneme', 1, '2025-06-13 23:35:28'),
(3, 1014, 10.00, 10.00, 'deneme', 1, '2025-06-13 23:38:57'),
(4, 1014, 1.00, 1.00, 'd', 1, '2025-06-13 23:39:05'),
(5, 1014, 1.00, 1.00, '', 1, '2025-06-13 23:43:06'),
(6, 1013, 20.00, 20.00, 'd', 1, '2025-06-13 23:43:18'),
(7, 1013, 5.00, 5.00, '5', 1, '2025-06-13 23:43:32'),
(8, 1013, -120.00, -40.00, '5', 1, '2025-06-13 23:43:46'),
(9, 1013, -1.00, -1.00, 'denemem2', 1, '2025-06-13 23:44:29'),
(10, 1013, 46.00, 46.00, 'denemem3', 1, '2025-06-13 23:51:49'),
(11, 1013, 10.00, 10.00, 'dd', 1, '2025-06-13 23:55:07'),
(12, 1013, 10.00, 10.00, 'dd', 1, '2025-06-13 23:55:19'),
(13, 1013, -60.00, -60.00, 'denemem4', 1, '2025-06-14 00:00:20'),
(14, 1013, 20.00, 20.00, 'denemem6', 1, '2025-06-14 00:00:41'),
(15, 1013, -10.00, -10.00, 'denenem9', 1, '2025-06-14 00:02:19'),
(16, 1013, 50.00, 101.00, '', 1, '2025-06-14 02:00:16'),
(17, 1014, 50.00, 101.00, '', 1, '2025-06-14 02:00:37'),
(18, 1014, 10.00, 10.00, '', 1, '2025-06-14 02:56:55'),
(19, 1013, 10.00, 10.00, '', 1, '2025-06-14 02:57:09'),
(20, 1, 10.00, 10.00, '', 1, '2025-06-14 03:03:38'),
(21, 1, 198.00, 176.00, '', 1, '2025-06-14 04:26:53'),
(22, 1, 200.00, 176.00, '', 1, '2025-06-14 04:28:09'),
(23, 1, -71.00, -140.00, '', 1, '2025-06-14 05:15:06');

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

--
-- Tablo için tablo yapısı `betyu_bets`
--

CREATE TABLE `betyu_bets` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `period_id` int(11) NOT NULL,
  `bet` int(11) NOT NULL,
  `selection` enum('win','lose') NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Tablo döküm verisi `betyu_bets`
--

INSERT INTO `betyu_bets` (`id`, `user_id`, `period_id`, `bet`, `selection`, `created_at`) VALUES
(9, 1, 14, 50, 'win', '2025-06-15 04:37:01'),
(10, 1, 15, 40, 'lose', '2025-06-15 04:37:48'),
(11, 1, 16, 100, 'win', '2025-06-15 04:38:59'),
(12, 1, 16, 50, 'lose', '2025-06-15 04:39:07'),
(13, 1, 17, 100, 'win', '2025-06-15 06:15:17'),
(14, 1, 18, 100, 'win', '2025-06-15 06:24:07'),
(15, 1, 20, 10, 'win', '2025-06-15 06:37:33'),
(16, 1, 22, 100, 'lose', '2025-06-15 06:44:56'),
(17, 1, 23, 100, 'win', '2025-06-15 06:51:35'),
(18, 1, 24, 10, 'lose', '2025-06-15 06:53:59'),
(19, 1014, 26, 100, 'win', '2025-06-17 20:53:31'),
(20, 1014, 26, 100, 'lose', '2025-06-17 20:53:37');

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

--
-- Tablo için tablo yapısı `betyu_logs`
--

CREATE TABLE `betyu_logs` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `bet` int(11) NOT NULL,
  `selection` varchar(10) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Tablo için tablo yapısı `betyu_periods`
--

CREATE TABLE `betyu_periods` (
  `id` int(11) NOT NULL,
  `start_date` date NOT NULL,
  `start_time` time NOT NULL,
  `end_time` time NOT NULL,
  `status` enum('pending','open','closed','resolved','cancelled') DEFAULT 'pending',
  `result` enum('win','lose','cancelled') DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Tablo döküm verisi `betyu_periods`
--

INSERT INTO `betyu_periods` (`id`, `start_date`, `start_time`, `end_time`, `status`, `result`, `created_at`) VALUES
(14, '2025-06-15', '05:00:00', '09:00:00', 'resolved', 'win', '2025-06-15 04:36:51'),
(15, '2025-06-15', '05:31:00', '10:31:00', 'resolved', 'lose', '2025-06-15 04:37:40'),
(16, '2025-06-15', '07:00:00', '09:00:00', 'resolved', 'win', '2025-06-15 04:38:47'),
(17, '2025-06-15', '09:14:00', '10:14:00', 'resolved', 'win', '2025-06-15 06:06:53'),
(18, '2025-06-15', '09:22:00', '10:22:00', 'resolved', 'lose', '2025-06-15 06:16:00'),
(19, '2025-06-15', '09:00:00', '10:00:00', 'resolved', 'win', '2025-06-15 06:25:53'),
(20, '2025-06-15', '09:36:00', '10:36:00', 'resolved', 'win', '2025-06-15 06:28:59'),
(21, '2025-06-15', '09:00:00', '10:00:00', 'cancelled', 'cancelled', '2025-06-15 06:44:24'),
(22, '2025-06-15', '09:00:00', '10:00:00', 'resolved', 'lose', '2025-06-15 06:44:51'),
(23, '2025-06-15', '09:00:00', '10:00:00', 'resolved', 'win', '2025-06-15 06:51:31'),
(24, '2025-06-15', '09:00:00', '10:00:00', 'cancelled', 'cancelled', '2025-06-15 06:53:55'),
(25, '2025-06-17', '22:00:00', '00:00:00', 'cancelled', 'cancelled', '2025-06-17 20:52:50'),
(26, '2025-06-17', '22:00:00', '23:59:00', 'resolved', 'win', '2025-06-17 20:53:27');

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

--
-- Tablo için tablo yapısı `betyu_text_settings`
--

CREATE TABLE `betyu_text_settings` (
  `id` int(11) NOT NULL,
  `text_type` enum('time','date') NOT NULL,
  `text_content` varchar(255) DEFAULT NULL,
  `active_until` datetime DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Tablo döküm verisi `betyu_text_settings`
--

INSERT INTO `betyu_text_settings` (`id`, `text_type`, `text_content`, `active_until`, `created_at`) VALUES
(5, 'time', '22:00', '2025-06-16 05:11:24', '2025-06-16 01:11:24'),
(6, 'date', '22 haziran', '2025-06-16 05:11:24', '2025-06-16 01:11:24'),
(7, 'time', '22:00', '2025-06-18 01:51:37', '2025-06-17 20:51:37'),
(8, 'date', '21 ağustos', '2025-06-18 02:51:37', '2025-06-17 20:51:37');

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

--
-- Tablo için tablo yapısı `general_settings`
--

CREATE TABLE `general_settings` (
  `id` int(11) NOT NULL DEFAULT 1,
  `reset_day` int(11) NOT NULL DEFAULT 1,
  `start_ticket` decimal(10,2) NOT NULL DEFAULT 0.00,
  `start_pap` decimal(10,2) NOT NULL DEFAULT 0.00,
  `last_reset_date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Tablo döküm verisi `general_settings`
--

INSERT INTO `general_settings` (`id`, `reset_day`, `start_ticket`, `start_pap`, `last_reset_date`) VALUES
(1, 1, 0.00, 0.00, NULL);

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

--
-- Tablo için tablo yapısı `investment_links`
--

CREATE TABLE `investment_links` (
  `id` int(11) NOT NULL,
  `step_index` int(11) NOT NULL,
  `link_name` varchar(100) NOT NULL,
  `link_url` varchar(500) NOT 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;

--
-- Tablo döküm verisi `investment_links`
--

INSERT INTO `investment_links` (`id`, `step_index`, `link_name`, `link_url`, `created_at`, `updated_at`) VALUES
(1, 0, 'Lady Gaga', 'https://youtu.be/0t1zR7kbhnc?list=LL', '2025-06-19 06:32:16', '2025-06-19 07:01:34'),
(2, 1, 'YouTube Link 2', 'https://youtu.be/0t1zR7kbhnc?list=LL', '2025-06-19 06:32:16', '2025-06-19 07:11:00'),
(3, 2, 'YouTube Link 3', 'https://youtu.be/0t1zR7kbhnc?list=LL', '2025-06-19 06:32:16', '2025-06-19 07:11:00'),
(4, 3, 'YouTube Link 4', 'https://youtu.be/0t1zR7kbhnc?list=LL', '2025-06-19 06:32:16', '2025-06-19 07:11:00'),
(5, 4, 'YouTube Link 5', 'https://youtu.be/0t1zR7kbhnc?list=LL', '2025-06-19 06:32:16', '2025-06-19 07:11:00'),
(6, 5, 'YouTube Link 6', 'https://youtu.be/0t1zR7kbhnc?list=LL', '2025-06-19 06:32:16', '2025-06-19 07:11:00');

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

--
-- Tablo için tablo yapısı `investment_reset_settings`
--

CREATE TABLE `investment_reset_settings` (
  `id` int(11) NOT NULL,
  `auto_reset_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `auto_reset_days` int(11) NOT NULL DEFAULT 30,
  `last_reset_date` datetime DEFAULT NULL,
  `next_reset_date` datetime 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;

--
-- Tablo döküm verisi `investment_reset_settings`
--

INSERT INTO `investment_reset_settings` (`id`, `auto_reset_enabled`, `auto_reset_days`, `last_reset_date`, `next_reset_date`, `created_at`, `updated_at`) VALUES
(1, 0, 30, '2025-06-19 10:24:07', NULL, '2025-06-19 08:09:05', '2025-06-19 08:24:07');

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

--
-- Tablo için tablo yapısı `investment_rewards`
--

CREATE TABLE `investment_rewards` (
  `id` int(11) NOT NULL,
  `pap_amount` int(11) DEFAULT 0,
  `ticket_amount` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Tablo döküm verisi `investment_rewards`
--

INSERT INTO `investment_rewards` (`id`, `pap_amount`, `ticket_amount`) VALUES
(1, 100, 1000);

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

--
-- Tablo için tablo yapısı `reward_logs`
--

CREATE TABLE `reward_logs` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `reward_date` date NOT NULL,
  `ticket_change` decimal(10,2) DEFAULT 0.00,
  `pap_change` decimal(10,2) DEFAULT 0.00,
  `operation` enum('add','subtract','set') NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Tablo için tablo yapısı `scratch_logs`
--

CREATE TABLE `scratch_logs` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `bet` int(11) NOT NULL,
  `win` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `prize_type` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Tablo döküm verisi `scratch_logs`
--

INSERT INTO `scratch_logs` (`id`, `user_id`, `bet`, `win`, `created_at`, `prize_type`) VALUES
(1, 1, 1, 5, '2025-06-14 06:28:32', NULL),
(2, 1, 1, 5, '2025-06-14 06:28:42', NULL),
(3, 1, 1, 1, '2025-06-14 07:07:26', NULL),
(4, 1, 1, 2, '2025-06-14 07:31:36', 'ticket'),
(5, 1, 1, 5, '2025-06-14 07:32:34', 'pap'),
(6, 1, 1, 5, '2025-06-16 01:36:47', 'pap');

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

--
-- Tablo için tablo yapısı `scratch_settings`
--

CREATE TABLE `scratch_settings` (
  `id` int(11) NOT NULL,
  `symbol_id` int(11) NOT NULL,
  `chance` decimal(5,2) NOT NULL,
  `value` int(11) NOT NULL,
  `type` enum('ticket','pap','retry') NOT 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;

--
-- Tablo döküm verisi `scratch_settings`
--

INSERT INTO `scratch_settings` (`id`, `symbol_id`, `chance`, `value`, `type`, `created_at`, `updated_at`) VALUES
(1, 1, 10.00, 1, 'ticket', '2025-06-12 23:24:52', '2025-06-14 05:28:42'),
(2, 2, 7.00, 2, 'ticket', '2025-06-12 23:29:27', '2025-06-12 23:48:43'),
(3, 3, 4.00, 5, 'ticket', '2025-06-12 23:29:28', '2025-06-12 23:48:45'),
(4, 4, 4.00, 1, 'pap', '2025-06-12 23:29:29', '2025-06-12 23:48:49'),
(5, 5, 3.00, 2, 'pap', '2025-06-12 23:29:30', '2025-06-12 23:48:52'),
(6, 6, 50.00, 5, 'pap', '2025-06-12 23:29:31', '2025-06-14 07:31:24'),
(7, 7, 1.00, 10, 'pap', '2025-06-12 23:29:32', '2025-06-12 23:48:58'),
(8, 8, 0.36, 100, 'pap', '2025-06-12 23:29:33', '2025-06-12 23:29:33'),
(9, 9, 10.61, 0, 'retry', '2025-06-12 23:29:34', '2025-06-14 07:32:25');

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

--
-- Tablo için tablo yapısı `slot_logs`
--

CREATE TABLE `slot_logs` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `bet` int(11) NOT NULL,
  `win` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `prize_type` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Tablo döküm verisi `slot_logs`
--

INSERT INTO `slot_logs` (`id`, `user_id`, `bet`, `win`, `created_at`, `prize_type`) VALUES
(1, 1, 1, 3, '2025-06-14 06:00:38', NULL),
(2, 1, 1, 2, '2025-06-14 06:23:24', NULL),
(3, 1, 1, 2, '2025-06-14 06:23:35', NULL),
(4, 1, 1, 1, '2025-06-14 06:23:47', NULL),
(5, 1, 1, 2, '2025-06-14 06:23:52', NULL),
(6, 1, 1, 1, '2025-06-14 06:23:58', NULL),
(7, 1, 1, 1, '2025-06-14 06:24:04', NULL),
(8, 1, 1, 2, '2025-06-14 06:24:10', NULL),
(9, 1, 1, 1, '2025-06-14 07:06:37', NULL),
(10, 1, 1, 1, '2025-06-14 07:06:51', NULL),
(11, 1, 1, 1, '2025-06-14 07:18:01', NULL),
(12, 1, 1, 2, '2025-06-14 07:18:17', NULL),
(13, 1, 1, 1, '2025-06-14 07:21:31', NULL),
(14, 1, 1, 1, '2025-06-14 07:23:18', 'pap'),
(15, 1, 1, 1, '2025-06-14 07:23:35', 'pap'),
(16, 1, 1, 1, '2025-06-14 07:23:41', 'pap'),
(17, 1, 1, 3, '2025-06-14 07:23:47', 'pap'),
(18, 1, 1, 2, '2025-06-14 07:23:53', 'pap'),
(19, 1, 1, 1, '2025-06-14 07:24:06', 'pap'),
(20, 1, 1, 1, '2025-06-14 07:24:14', 'pap'),
(21, 1, 1, 3, '2025-06-14 07:26:06', 'bilet'),
(22, 1, 1, 1, '2025-06-14 07:26:16', 'pap'),
(23, 1, 1, 1, '2025-06-14 07:26:37', 'pap'),
(24, 1, 1, 1, '2025-06-14 07:27:01', 'pap'),
(25, 1, 1, 1, '2025-06-14 07:28:01', 'pap'),
(26, 1, 1, 4, '2025-06-14 10:48:36', 'pap+bilet'),
(27, 1, 1, 1, '2025-06-14 10:48:50', 'pap'),
(28, 1, 1, 1, '2025-06-14 10:48:58', 'pap');

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

--
-- Tablo için tablo yapısı `symbols`
--

CREATE TABLE `symbols` (
  `id` int(11) NOT NULL,
  `symbol` varchar(10) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Tablo döküm verisi `symbols`
--

INSERT INTO `symbols` (`id`, `symbol`, `created_at`) VALUES
(1, '🍒', '2025-05-26 01:05:58'),
(2, '🍊', '2025-05-26 01:05:58'),
(3, '🍋', '2025-05-26 01:05:58'),
(4, '🍇', '2025-05-26 01:05:58'),
(5, '🍉', '2025-05-26 01:05:58'),
(6, '7️⃣', '2025-05-26 01:05:58'),
(7, '💎', '2025-05-26 01:05:58'),
(8, '🎰', '2025-05-26 01:05:58'),
(9, '🍒', '2025-05-26 19:15:02'),
(10, '🍊', '2025-05-26 19:15:02'),
(11, '🍋', '2025-05-26 19:15:02'),
(12, '🍇', '2025-05-26 19:15:02'),
(13, '🍉', '2025-05-26 19:15:02'),
(14, '7️⃣', '2025-05-26 19:15:02'),
(15, '💎', '2025-05-26 19:15:02'),
(16, '🎰', '2025-05-26 19:15:02'),
(17, '🍒', '2025-05-26 19:40:00'),
(18, '🍊', '2025-05-26 19:40:00'),
(19, '🍋', '2025-05-26 19:40:00'),
(20, '🍇', '2025-05-26 19:40:00'),
(21, '🍉', '2025-05-26 19:40:00'),
(22, '7️⃣', '2025-05-26 19:40:00'),
(23, '💎', '2025-05-26 19:40:00'),
(24, '🎰', '2025-05-26 19:40:00'),
(25, '🍒', '2025-05-26 22:29:21'),
(26, '🍊', '2025-05-26 22:29:21'),
(27, '🍋', '2025-05-26 22:29:21'),
(28, '🍇', '2025-05-26 22:29:21'),
(29, '🍉', '2025-05-26 22:29:21'),
(30, '7️⃣', '2025-05-26 22:29:21'),
(31, '💎', '2025-05-26 22:29:21'),
(32, '🎰', '2025-05-26 22:29:21');

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

--
-- Tablo için tablo yapısı `symbol_settings`
--

CREATE TABLE `symbol_settings` (
  `id` int(11) NOT NULL,
  `symbol_id` int(11) NOT NULL,
  `chance` decimal(5,2) NOT NULL,
  `value` int(11) NOT NULL,
  `type` enum('pap','ticket') NOT 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;

--
-- Tablo döküm verisi `symbol_settings`
--

INSERT INTO `symbol_settings` (`id`, `symbol_id`, `chance`, `value`, `type`, `created_at`, `updated_at`) VALUES
(1, 0, 3.61, 1, 'pap', '2025-06-12 22:21:26', '2025-06-14 11:14:52'),
(2, 1, 2.53, 2, 'pap', '2025-06-12 22:35:38', '2025-06-12 22:35:38'),
(3, 2, 1.81, 5, 'pap', '2025-06-12 22:35:39', '2025-06-12 22:35:39'),
(4, 3, 1.08, 10, 'pap', '2025-06-12 22:35:40', '2025-06-12 22:35:40'),
(5, 4, 1.81, 10, 'ticket', '2025-06-12 22:35:41', '2025-06-12 22:35:41'),
(6, 5, 3.61, 5, 'ticket', '2025-06-12 22:35:42', '2025-06-12 22:35:42'),
(7, 6, 5.42, 3, 'ticket', '2025-06-12 22:35:44', '2025-06-12 22:35:44'),
(8, 7, 7.23, 3, 'ticket', '2025-06-12 22:35:59', '2025-06-12 22:35:59'),
(9, 8, 0.72, 100, 'pap', '2025-06-12 22:36:01', '2025-06-12 22:36:01'),
(10, 9, 0.72, 100, 'pap', '2025-06-12 22:36:03', '2025-06-12 22:36:03'),
(11, 10, 0.72, 100, 'pap', '2025-06-12 22:36:05', '2025-06-12 22:36:05'),
(12, 11, 0.72, 100, 'pap', '2025-06-12 22:36:06', '2025-06-12 22:36:06'),
(13, 12, 0.72, 100, 'pap', '2025-06-12 22:36:08', '2025-06-12 22:36:08');

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

--
-- Tablo için tablo yapısı `tasks`
--

CREATE TABLE `tasks` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `description` text DEFAULT NULL,
  `reward_ticket` decimal(10,2) DEFAULT 0.00,
  `reward_pap` decimal(10,2) DEFAULT 0.00,
  `type` enum('daily_login') NOT NULL DEFAULT 'daily_login',
  `is_active` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Tablo döküm verisi `tasks`
--

INSERT INTO `tasks` (`id`, `name`, `description`, `reward_ticket`, `reward_pap`, `type`, `is_active`) VALUES
(1, 'Günlük Giriş Ödülü', 'Her gün ilk girişte verilen ödül', 10.00, 0.00, 'daily_login', 1);

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

--
-- Tablo için tablo yapısı `user_investment_steps`
--

CREATE TABLE `user_investment_steps` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `step_index` tinyint(4) NOT NULL,
  `status` enum('pending','waiting','approved','rejected','joker') DEFAULT 'pending',
  `image_path` varchar(255) DEFAULT NULL,
  `admin_note` text DEFAULT NULL,
  `investment_link` varchar(255) DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Tablo döküm verisi `user_investment_steps`
--

INSERT INTO `user_investment_steps` (`id`, `user_id`, `step_index`, `status`, `image_path`, `admin_note`, `investment_link`, `updated_at`) VALUES
(1, 1014, 1, 'approved', 'uploads/investments/user1014_step1_1750321744.jpg', '', NULL, '2025-06-19 08:29:48'),
(2, 1014, 2, 'approved', 'uploads/investments/user1014_step2_1750321756.jpg', '', NULL, '2025-06-19 08:29:51'),
(4, 1014, 0, 'approved', 'uploads/investments/user1014_step0_1750321736.jpg', '', NULL, '2025-06-19 08:29:46'),
(5, 1014, 3, 'approved', 'uploads/investments/user1014_step3_1750321763.jpg', '', NULL, '2025-06-19 08:29:54'),
(6, 1014, 4, 'approved', 'uploads/investments/user1014_step4_1750321771.jpg', '', NULL, '2025-06-19 08:29:56'),
(7, 1014, 5, 'approved', 'uploads/investments/user1014_step5_1750321778.jpg', '', NULL, '2025-06-19 08:29:58');

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

--
-- Tablo için tablo yapısı `user_jokers`
--

CREATE TABLE `user_jokers` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `joker_code` varchar(64) NOT NULL,
  `used` tinyint(1) DEFAULT 0,
  `used_step_index` tinyint(4) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Tablo için tablo yapısı `user_stats`
--

CREATE TABLE `user_stats` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `total_games` int(11) NOT NULL DEFAULT 0,
  `total_wins` int(11) NOT NULL DEFAULT 0,
  `total_losses` int(11) NOT NULL DEFAULT 0,
  `highest_win` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Tablo döküm verisi `user_stats`
--

INSERT INTO `user_stats` (`id`, `user_id`, `total_games`, `total_wins`, `total_losses`, `highest_win`) VALUES
(1, 1, 0, 0, 0, 0),
(2, 1, 0, 0, 0, 0),
(3, 3, 0, 0, 0, 0),
(4, 3, 0, 0, 0, 0),
(5, 5, 0, 0, 0, 0),
(6, 6, 0, 0, 0, 0),
(7, 3, 0, 0, 0, 0),
(8, 68, 0, 0, 0, 0),
(9, 82, 0, 0, 0, 0),
(10, 586, 0, 0, 0, 0),
(11, 1, 0, 0, 0, 0);

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

--
-- Tablo için tablo yapısı `user_task_logs`
--

CREATE TABLE `user_task_logs` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `task_id` int(11) NOT NULL,
  `log_date` date NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Tablo için tablo yapısı `wheel_logs`
--

CREATE TABLE `wheel_logs` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `bet_amount` decimal(10,2) NOT NULL,
  `win_amount` decimal(10,2) NOT NULL,
  `prize_type` varchar(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `wheel_logs`
--

INSERT INTO `wheel_logs` (`id`, `user_id`, `bet_amount`, `win_amount`, `prize_type`, `created_at`) VALUES
(1, 1, 1.00, 0.00, 'tekrar', '2025-06-14 07:03:41'),
(2, 1, 1.00, 5.00, 'bilet', '2025-06-14 07:11:13'),
(3, 1, 1.00, 0.00, 'tekrar', '2025-06-14 07:11:26'),
(4, 1, 1.00, 5.00, 'bilet', '2025-06-14 07:13:10'),
(5, 1, 1.00, 100.00, 'pap', '2025-06-16 01:54:48'),
(6, 1, 1.00, 0.00, 'tekrar', '2025-06-16 02:24:46'),
(7, 1, 1.00, 100.00, 'pap', '2025-06-16 02:39:01'),
(8, 1, 1.00, 100.00, 'pap', '2025-06-16 02:39:08'),
(9, 1, 1.00, 0.00, 'tekrar', '2025-06-16 02:46:04'),
(10, 1, 1.00, 5.00, 'bilet', '2025-06-16 02:46:31'),
(11, 1, 1.00, 2.00, 'bilet', '2025-06-16 02:47:10'),
(12, 1, 1.00, 20.00, 'bilet', '2025-06-16 03:29:00');

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

--
-- Tablo için tablo yapısı `wheel_settings`
--

CREATE TABLE `wheel_settings` (
  `id` int(11) NOT NULL,
  `type` varchar(50) NOT NULL,
  `value` int(11) NOT NULL,
  `amount` int(11) NOT NULL DEFAULT 1,
  `chance` float NOT NULL,
  `image` varchar(255) NOT 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;

--
-- Tablo döküm verisi `wheel_settings`
--

INSERT INTO `wheel_settings` (`id`, `type`, `value`, `amount`, `chance`, `image`, `created_at`, `updated_at`) VALUES
(1, 'ticket', 20, 2, 7, 'ticket-2.png', '2025-06-13 00:21:26', '2025-06-13 01:50:30'),
(2, 'ticket', 50, 5, 2, 'ticket-5.png', '2025-06-13 00:21:26', '2025-06-13 01:52:04'),
(3, 'retry', 0, 10, 20, 'ticket-10.png', '2025-06-13 00:21:26', '2025-06-13 01:53:04'),
(4, 'ticket', 100, 20, 2, 'ticket-20.png', '2025-06-13 00:21:26', '2025-06-13 01:50:19'),
(5, 'pap', 100, 1, 80, 'ticket-50.png', '2025-06-13 00:21:26', '2025-06-14 06:34:46'),
(6, 'retry', 0, 1, 20, 'pap-100.png', '2025-06-13 00:21:26', '2025-06-13 01:53:04'),
(7, 'pap', 1000, 1, 1, 'retry.png', '2025-06-13 00:21:26', '2025-06-14 05:42:24'),
(8, 'ticket', 2, 1000, 20, 'pap-1000.png', '2025-06-13 00:21:26', '2025-06-13 01:53:04'),
(9, 'retry', 0, 0, 20, 'retry.png', '2025-06-13 00:21:26', '2025-06-13 01:53:04'),
(10, 'ticket', 5, 1, 8, 'retry.png', '2025-06-13 01:03:28', '2025-06-13 01:50:49'),
(11, 'ticket', 10, 1, 10, 'retry.png', '2025-06-13 01:03:28', '2025-06-13 01:50:02'),
(12, 'retry', 0, 1, 20, 'retry.png', '2025-06-13 01:03:28', '2025-06-13 01:53:04');

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

--
-- Tablo için tablo yapısı `withdraw_requests`
--

CREATE TABLE `withdraw_requests` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `amount` int(11) NOT NULL,
  `status` enum('pending','approved','rejected') NOT NULL DEFAULT 'pending',
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `admin_note` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Tablo döküm verisi `withdraw_requests`
--

INSERT INTO `withdraw_requests` (`id`, `user_id`, `amount`, `status`, `created_at`, `updated_at`, `admin_note`) VALUES
(1, 1, 100, 'rejected', '2025-06-16 18:22:25', '2025-06-16 18:30:02', NULL),
(2, 1, 100, 'rejected', '2025-06-16 18:30:14', '2025-06-16 18:30:21', NULL),
(3, 1, 500, 'rejected', '2025-06-16 18:30:30', '2025-06-16 18:30:35', NULL),
(4, 1, 200, 'approved', '2025-06-16 18:30:41', '2025-06-16 18:30:45', NULL),
(5, 1, 110, 'approved', '2025-06-16 18:32:38', '2025-06-16 18:32:45', NULL),
(6, 1, 100, 'approved', '2025-06-16 18:35:05', '2025-06-16 18:35:11', NULL),
(7, 1, 100, 'rejected', '2025-06-16 18:59:21', '2025-06-16 19:01:27', NULL),
(8, 1, 150, 'rejected', '2025-06-17 03:39:58', '2025-06-17 03:40:13', NULL),
(9, 1, 120, 'approved', '2025-06-17 03:40:27', '2025-06-17 03:40:30', NULL),
(10, 1014, 100, 'approved', '2025-06-17 23:54:18', '2025-06-17 23:54:37', NULL);

--
-- Dökümü yapılmış tablolar için indeksler
--

--
-- Tablo için indeksler `balance_logs`
--
ALTER TABLE `balance_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `admin_id` (`admin_id`);

--
-- Tablo için indeksler `betyu_bets`
--
ALTER TABLE `betyu_bets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `period_id` (`period_id`);

--
-- Tablo için indeksler `betyu_logs`
--
ALTER TABLE `betyu_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Tablo için indeksler `betyu_periods`
--
ALTER TABLE `betyu_periods`
  ADD PRIMARY KEY (`id`);

--
-- Tablo için indeksler `betyu_text_settings`
--
ALTER TABLE `betyu_text_settings`
  ADD PRIMARY KEY (`id`);

--
-- Tablo için indeksler `general_settings`
--
ALTER TABLE `general_settings`
  ADD PRIMARY KEY (`id`);

--
-- Tablo için indeksler `investment_links`
--
ALTER TABLE `investment_links`
  ADD PRIMARY KEY (`id`);

--
-- Tablo için indeksler `investment_reset_settings`
--
ALTER TABLE `investment_reset_settings`
  ADD PRIMARY KEY (`id`);

--
-- Tablo için indeksler `investment_rewards`
--
ALTER TABLE `investment_rewards`
  ADD PRIMARY KEY (`id`);

--
-- Tablo için indeksler `reward_logs`
--
ALTER TABLE `reward_logs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `user_id` (`user_id`,`reward_date`);

--
-- Tablo için indeksler `scratch_logs`
--
ALTER TABLE `scratch_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Tablo için indeksler `scratch_settings`
--
ALTER TABLE `scratch_settings`
  ADD PRIMARY KEY (`id`);

--
-- Tablo için indeksler `slot_logs`
--
ALTER TABLE `slot_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Tablo için indeksler `symbols`
--
ALTER TABLE `symbols`
  ADD PRIMARY KEY (`id`);

--
-- Tablo için indeksler `symbol_settings`
--
ALTER TABLE `symbol_settings`
  ADD PRIMARY KEY (`id`);

--
-- Tablo için indeksler `tasks`
--
ALTER TABLE `tasks`
  ADD PRIMARY KEY (`id`);

--
-- Tablo için indeksler `user_investment_steps`
--
ALTER TABLE `user_investment_steps`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `user_id` (`user_id`,`step_index`);

--
-- Tablo için indeksler `user_jokers`
--
ALTER TABLE `user_jokers`
  ADD PRIMARY KEY (`id`);

--
-- Tablo için indeksler `user_stats`
--
ALTER TABLE `user_stats`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Tablo için indeksler `user_task_logs`
--
ALTER TABLE `user_task_logs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `user_id` (`user_id`,`task_id`,`log_date`);

--
-- Tablo için indeksler `wheel_logs`
--
ALTER TABLE `wheel_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Tablo için indeksler `wheel_settings`
--
ALTER TABLE `wheel_settings`
  ADD PRIMARY KEY (`id`);

--
-- Tablo için indeksler `withdraw_requests`
--
ALTER TABLE `withdraw_requests`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Dökümü yapılmış tablolar için AUTO_INCREMENT değeri
--

--
-- Tablo için AUTO_INCREMENT değeri `balance_logs`
--
ALTER TABLE `balance_logs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- Tablo için AUTO_INCREMENT değeri `betyu_bets`
--
ALTER TABLE `betyu_bets`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- Tablo için AUTO_INCREMENT değeri `betyu_logs`
--
ALTER TABLE `betyu_logs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `betyu_periods`
--
ALTER TABLE `betyu_periods`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- Tablo için AUTO_INCREMENT değeri `betyu_text_settings`
--
ALTER TABLE `betyu_text_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- Tablo için AUTO_INCREMENT değeri `investment_links`
--
ALTER TABLE `investment_links`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- Tablo için AUTO_INCREMENT değeri `investment_reset_settings`
--
ALTER TABLE `investment_reset_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Tablo için AUTO_INCREMENT değeri `investment_rewards`
--
ALTER TABLE `investment_rewards`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Tablo için AUTO_INCREMENT değeri `reward_logs`
--
ALTER TABLE `reward_logs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `scratch_logs`
--
ALTER TABLE `scratch_logs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- Tablo için AUTO_INCREMENT değeri `scratch_settings`
--
ALTER TABLE `scratch_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- Tablo için AUTO_INCREMENT değeri `slot_logs`
--
ALTER TABLE `slot_logs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;

--
-- Tablo için AUTO_INCREMENT değeri `symbols`
--
ALTER TABLE `symbols`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;

--
-- Tablo için AUTO_INCREMENT değeri `symbol_settings`
--
ALTER TABLE `symbol_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- Tablo için AUTO_INCREMENT değeri `tasks`
--
ALTER TABLE `tasks`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Tablo için AUTO_INCREMENT değeri `user_investment_steps`
--
ALTER TABLE `user_investment_steps`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;

--
-- Tablo için AUTO_INCREMENT değeri `user_jokers`
--
ALTER TABLE `user_jokers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `user_stats`
--
ALTER TABLE `user_stats`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- Tablo için AUTO_INCREMENT değeri `user_task_logs`
--
ALTER TABLE `user_task_logs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `wheel_logs`
--
ALTER TABLE `wheel_logs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- Tablo için AUTO_INCREMENT değeri `wheel_settings`
--
ALTER TABLE `wheel_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- Tablo için AUTO_INCREMENT değeri `withdraw_requests`
--
ALTER TABLE `withdraw_requests`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- Dökümü yapılmış tablolar için kısıtlamalar
--

--
-- Tablo kısıtlamaları `balance_logs`
--
ALTER TABLE `balance_logs`
  ADD CONSTRAINT `balance_logs_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `balance_logs_ibfk_2` FOREIGN KEY (`admin_id`) REFERENCES `users` (`id`);

--
-- Tablo kısıtlamaları `betyu_bets`
--
ALTER TABLE `betyu_bets`
  ADD CONSTRAINT `betyu_bets_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `betyu_bets_ibfk_2` FOREIGN KEY (`period_id`) REFERENCES `betyu_periods` (`id`);

--
-- Tablo kısıtlamaları `betyu_logs`
--
ALTER TABLE `betyu_logs`
  ADD CONSTRAINT `betyu_logs_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Tablo kısıtlamaları `scratch_logs`
--
ALTER TABLE `scratch_logs`
  ADD CONSTRAINT `scratch_logs_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Tablo kısıtlamaları `slot_logs`
--
ALTER TABLE `slot_logs`
  ADD CONSTRAINT `slot_logs_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Tablo kısıtlamaları `user_stats`
--
ALTER TABLE `user_stats`
  ADD CONSTRAINT `user_stats_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `wheel_logs`
--
ALTER TABLE `wheel_logs`
  ADD CONSTRAINT `wheel_logs_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Tablo kısıtlamaları `withdraw_requests`
--
ALTER TABLE `withdraw_requests`
  ADD CONSTRAINT `withdraw_requests_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
COMMIT;

