-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 01/04/2026 às 02:43
-- Versão do servidor: 10.4.32-MariaDB
-- Versão do PHP: 8.2.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Banco de dados: `helix_jump`
--

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

--
-- Estrutura para tabela `admins`
--

CREATE TABLE `admins` (
  `id` int(11) NOT NULL,
  `username` varchar(50) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `admins`
--

INSERT INTO `admins` (`id`, `username`, `password`, `created_at`) VALUES
(1, 'admin', '$2y$10$51yInATqkKbEu.6SxB7EbOSmVDSietfL5BHvYB.51w.ELVzeZXDBK', '2026-03-29 18:05:26'),
(2, NULL, NULL, '2026-03-30 21:12:22'),

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

--
-- Estrutura para tabela `affiliate_withdrawals`
--

CREATE TABLE `affiliate_withdrawals` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `chave_pix` varchar(255) DEFAULT NULL,
  `status` enum('pending','completed','rejected') DEFAULT 'pending',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para tabela `deposits`
--

CREATE TABLE `deposits` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `status` enum('pending','completed','failed') DEFAULT 'pending',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `transaction_id` varchar(255) DEFAULT NULL,
  `external_id` varchar(255) DEFAULT NULL,
  `gateway` varchar(20) DEFAULT 'ecompag',
  `webhook_received_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `deposits`
--

INSERT INTO `deposits` (`id`, `user_id`, `amount`, `status`, `created_at`, `transaction_id`, `external_id`, `gateway`, `webhook_received_at`) VALUES

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

--
-- Estrutura para tabela `footer_networks`
--

CREATE TABLE `footer_networks` (
  `id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `icon_svg` text NOT NULL,
  `link` varchar(255) NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `footer_networks`
--

INSERT INTO `footer_networks` (`id`, `name`, `icon_svg`, `link`, `is_active`, `created_at`) VALUES
(1, 'Instagram', '<path d=\"M16 11.37A4 4 0 1112.63 8 4 4 0 0116 11.37zM17.5 6.5h.01\"></path><rect x=\"2\" y=\"2\" width=\"20\" height=\"20\" rx=\"5\" ry=\"5\"></rect>', 'https://instagram.com/jumpcash', 1, '2026-03-31 07:15:53'),
(2, 'Telegram', '<path d=\"M21.198 2.499a2.242 2.242 0 0 0-1.02.215L1.758 11.233c-.765.344-.76.76-.11.966l4.636 1.442h.001l1.761 5.37a.9.9 0 0 0 .546.545.913.913 0 0 0 .61-.013l3.541-2.915 4.545 3.328a2.235 2.235 0 0 0 1.29.418c.287 0 .57-.056.84-.167.545-.224.877-.66.93-1.22l2.364-15.544a2.23 2.23 0 0 0-.256-1.545l-.014-.01z\"></path>', 'https://t.me/jumpcash', 1, '2026-03-31 07:15:53');

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

--
-- Estrutura para tabela `game_history`
--

CREATE TABLE `game_history` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `bet_amount` decimal(10,2) DEFAULT NULL,
  `multiplier` decimal(5,2) DEFAULT NULL,
  `payout` decimal(10,2) DEFAULT NULL,
  `status` enum('win','lose','pending') DEFAULT 'pending',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `target_outcome` enum('win','lose') DEFAULT 'lose'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `game_history`
--

INSERT INTO `game_history` (`id`, `user_id`, `bet_amount`, `multiplier`, `payout`, `status`, `created_at`, `target_outcome`) VALUES

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

--
-- Estrutura para tabela `settings`
--

CREATE TABLE `settings` (
  `id` int(11) NOT NULL,
  `key_name` varchar(50) DEFAULT NULL,
  `value` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `settings`
--

INSERT INTO `settings` (`id`, `key_name`, `value`, `created_at`) VALUES
(1, 'logo_path', 'assets/images/logo.png', '2026-03-29 19:31:41'),
(3, 'banner1_path', 'assets/images/banners/banner1.png', '2026-03-29 19:31:41'),
(4, 'banner2_path', 'assets/images/banners/banner2.png', '2026-03-29 19:31:41'),
(5, 'banner3_path', 'assets/images/banners/banner3.png', '2026-03-29 19:31:41'),
(6, 'ecompag_client_id', '', '2026-03-29 19:41:23'),
(7, 'ecompag_client_secret', '', '2026-03-29 19:41:23'),
(8, 'withdrawal_mode', 'manual', '2026-03-29 19:41:23'),
(9, 'game_difficulty', '100', '2026-03-29 20:21:21'),
(10, 'site_name', 'HELIX CASH', '2026-03-29 21:12:22'),
(11, 'primary_color', '#00ffff', '2026-03-29 21:12:22'),
(12, 'pixup_client_id', 'a', '2026-03-30 18:17:25'),
(13, 'pixup_client_secret', 'a', '2026-03-30 18:17:25'),
(14, 'pixup_webhook_url', 'http://seudominio.com/api/webhook_pixup.php', '2026-03-30 18:17:25'),
(15, 'payment_gateway', 'pixup', '2026-03-30 18:17:25'),
(16, 'min_deposit', '20', '2026-03-30 18:17:25'),
(17, 'max_deposit', '50000', '2026-03-30 18:17:25'),
(18, 'min_withdraw', '50', '2026-03-30 18:17:25'),
(19, 'max_withdraw', '10000', '2026-03-30 18:17:25'),
(20, 'antifraud_deposit_window', '30', '2026-03-30 18:17:25'),
(21, 'default_cpa_value', '20.00', '2026-03-31 06:00:11'),
(22, 'default_revshare_percentage', '20.00', '2026-03-31 06:00:11'),
(23, 'payout_per_drop_percentage', '5.0', '2026-03-31 08:16:13'),
(24, 'support_link', 'https://t.me/seucanal', '2026-04-01 00:04:28');

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

--
-- Estrutura para tabela `transaction_logs`
--

CREATE TABLE `transaction_logs` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `type` enum('deposit','withdrawal') NOT NULL,
  `ref_id` int(11) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `status` varchar(30) NOT NULL,
  `gateway` varchar(20) DEFAULT NULL,
  `transaction_id` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para tabela `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `session_id` varchar(255) DEFAULT NULL,
  `balance` decimal(10,2) NOT NULL DEFAULT 0.00,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `username` varchar(100) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `cpf` varchar(11) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `is_banned` tinyint(4) DEFAULT 0,
  `withdraw_locked` tinyint(4) DEFAULT 0,
  `betting_locked` tinyint(4) DEFAULT 0,
  `referral_code` varchar(20) DEFAULT NULL,
  `referred_by` int(11) DEFAULT NULL,
  `affiliate_balance` decimal(10,2) DEFAULT 0.00,
  `cpa_earned` decimal(10,2) DEFAULT 0.00,
  `revshare_earned` decimal(10,2) DEFAULT 0.00,
  `is_influencer` tinyint(4) DEFAULT 0,
  `affiliate_status` enum('active','blocked') DEFAULT 'active',
  `cpa_paid` tinyint(4) DEFAULT 0,
  `demo_balance` decimal(15,2) DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `users`
--

INSERT INTO `users` (`id`, `session_id`, `balance`, `created_at`, `username`, `email`, `cpf`, `password`, `is_banned`, `withdraw_locked`, `betting_locked`, `referral_code`, `referred_by`, `affiliate_balance`, `cpa_earned`, `revshare_earned`, `is_influencer`, `affiliate_status`, `cpa_paid`, `demo_balance`) VALUES

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

--
-- Estrutura para tabela `withdrawals`
--

CREATE TABLE `withdrawals` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `status` enum('pending','completed','rejected') DEFAULT 'pending',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `transaction_id` varchar(255) DEFAULT NULL,
  `chave_pix` varchar(255) DEFAULT NULL,
  `external_id` varchar(255) DEFAULT NULL,
  `gateway` varchar(20) DEFAULT 'ecompag',
  `webhook_received_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Índices para tabelas despejadas
--

--
-- Índices de tabela `admins`
--
ALTER TABLE `admins`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `username` (`username`);

--
-- Índices de tabela `affiliate_withdrawals`
--
ALTER TABLE `affiliate_withdrawals`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Índices de tabela `deposits`
--
ALTER TABLE `deposits`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `transaction_id` (`transaction_id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `idx_dep_tx` (`transaction_id`),
  ADD KEY `idx_dep_ext` (`external_id`);

--
-- Índices de tabela `footer_networks`
--
ALTER TABLE `footer_networks`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `game_history`
--
ALTER TABLE `game_history`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Índices de tabela `settings`
--
ALTER TABLE `settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `key_name` (`key_name`);

--
-- Índices de tabela `transaction_logs`
--
ALTER TABLE `transaction_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_tl_user` (`user_id`),
  ADD KEY `idx_tl_txid` (`transaction_id`);

--
-- Índices de tabela `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `session_id` (`session_id`),
  ADD UNIQUE KEY `username` (`username`),
  ADD UNIQUE KEY `email` (`email`),
  ADD UNIQUE KEY `cpf` (`cpf`),
  ADD UNIQUE KEY `referral_code` (`referral_code`);

--
-- Índices de tabela `withdrawals`
--
ALTER TABLE `withdrawals`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `transaction_id` (`transaction_id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `idx_wit_tx` (`transaction_id`),
  ADD KEY `idx_wit_ext` (`external_id`);

--
-- AUTO_INCREMENT para tabelas despejadas
--

--
-- AUTO_INCREMENT de tabela `admins`
--
ALTER TABLE `admins`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de tabela `affiliate_withdrawals`
--
ALTER TABLE `affiliate_withdrawals`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `deposits`
--
ALTER TABLE `deposits`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT de tabela `footer_networks`
--
ALTER TABLE `footer_networks`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de tabela `game_history`
--
ALTER TABLE `game_history`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=178;

--
-- AUTO_INCREMENT de tabela `settings`
--
ALTER TABLE `settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;

--
-- AUTO_INCREMENT de tabela `transaction_logs`
--
ALTER TABLE `transaction_logs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `users`
--
ALTER TABLE `users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT de tabela `withdrawals`
--
ALTER TABLE `withdrawals`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Restrições para tabelas despejadas
--

--
-- Restrições para tabelas `affiliate_withdrawals`
--
ALTER TABLE `affiliate_withdrawals`
  ADD CONSTRAINT `affiliate_withdrawals_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Restrições para tabelas `deposits`
--
ALTER TABLE `deposits`
  ADD CONSTRAINT `deposits_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Restrições para tabelas `game_history`
--
ALTER TABLE `game_history`
  ADD CONSTRAINT `game_history_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Restrições para tabelas `withdrawals`
--
ALTER TABLE `withdrawals`
  ADD CONSTRAINT `withdrawals_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
