-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 02-06-2026 a las 05:27:59
-- Versión del servidor: 10.4.32-MariaDB
-- Versión de PHP: 8.2.12

START TRANSACTION;



--
-- Base de datos: `ryasgremory_db`
--

DELIMITER $$
--
-- Procedimientos
--
CREATE DEFINER=`ryasgremory`@`%` PROCEDURE `sp_clean_old_antispam` (IN `days_old` INT)   BEGIN
    DELETE FROM antispam 
    WHERE last_checked_on < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL days_old DAY));
END$$

DELIMITER ;

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

--
-- Estructura de tabla para la tabla `antispam`
--

CREATE TABLE `antispam` (
  `id` int(11) NOT NULL,
  `userid` varchar(50) NOT NULL,
  `last_checked_on` bigint(20) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `last_card` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `antispam`
--

INSERT INTO `antispam` (`id`, `userid`, `last_checked_on`, `created_at`, `last_card`) VALUES
(1, '6272088872', 1780353286, '2026-05-24 18:18:40', '4327390125685217|08|2028|992'),
(2, '6092965748', 1779925779, '2026-05-27 23:34:06', ''),
(3, '5429303364', 1780178936, '2026-05-28 00:01:00', '4147202634130650|09|2028|382'),
(4, '1464486841', 1780359952, '2026-06-02 00:24:52', '4432385620464060|01|2027|625');

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

--
-- Estructura de tabla para la tabla `authorized_chats`
--

CREATE TABLE `authorized_chats` (
  `id` int(11) NOT NULL,
  `chat_id` varchar(50) NOT NULL,
  `expires_at` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `authorized_chats`
--

INSERT INTO `authorized_chats` (`id`, `chat_id`, `expires_at`, `created_at`) VALUES
(0, '6272088872', '2053-10-08 14:50:34', '2026-05-24 19:50:34'),
(0, '-1003303441958', '2026-06-08 22:52:11', '2026-05-24 20:52:11');

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

--
-- Estructura de tabla para la tabla `bin_security`
--

CREATE TABLE `bin_security` (
  `bin` varchar(6) NOT NULL,
  `last_decline` timestamp NOT NULL DEFAULT current_timestamp(),
  `decline_count` int(11) DEFAULT 0,
  `status` varchar(20) DEFAULT 'Safe'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Volcado de datos para la tabla `bin_security`
--

INSERT INTO `bin_security` (`bin`, `last_decline`, `decline_count`, `status`) VALUES
('414718', '2026-05-29 20:16:37', 12, 'Safe'),
('414720', '2026-05-30 22:06:13', 0, 'Safe'),
('432739', '2026-06-01 21:33:52', 1, 'Safe'),
('442742', '2026-05-29 21:12:58', 7, 'Safe'),
('443238', '2026-06-02 00:26:02', 1, 'Safe'),
('443628', '2026-05-29 21:00:19', 3, 'Safe'),
('452516', '2026-05-29 20:45:02', 1, 'Safe'),
('478200', '2026-05-29 16:17:11', 5, 'Safe'),
('481514', '2026-05-28 18:47:08', 1, 'Safe'),
('484374', '2026-05-29 18:34:00', 4, 'Safe'),
('517116', '2026-05-28 16:28:01', 1, 'Safe'),
('528843', '2026-06-01 19:17:23', 9, 'Safe');

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

--
-- Estructura de tabla para la tabla `cards_checked`
--

CREATE TABLE `cards_checked` (
  `card_hash` varchar(64) NOT NULL,
  `userid` varchar(50) DEFAULT NULL,
  `checked_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Volcado de datos para la tabla `cards_checked`
--

INSERT INTO `cards_checked` (`card_hash`, `userid`, `checked_at`) VALUES
('0b9294d56c5c1360038deeafc1bbaa4b5db7c5cb6e881858d8ffe81ad078aa6c', '6272088872', '2026-05-29 20:02:17'),
('11ba05de57767d34397efeff8e73971f86b3559585faa53a0b6125ace7ec162b', '6272088872', '2026-05-31 20:03:42'),
('14fcebe9c0541bde80250ee58f7199f603fce1c986e68b09d4f5bd5c37807693', '5429303364', '2026-05-29 19:55:46'),
('1b671dd7c8fdd6fe77c6b206978014a013b18c7ffbdcc43f85ea564d60c93920', '6272088872', '2026-05-29 20:45:00'),
('1e22cbc771f2a1c738d6c16b2ae426d485fe346f2888a82488b832a1458e402a', '6272088872', '2026-05-31 21:04:31'),
('34f0576ae856cb427c9b3efacc90f05857456d2ebb561f88434af57221e154f7', '1464486841', '2026-06-02 00:25:52'),
('39e8118847e395cb741f643f9aed7dde696d92d161694bc20d4adff36e3c256a', '6272088872', '2026-05-31 20:47:15'),
('4f211c196493d719bbaec5ca9062c68fc51a7ae954616ff334f586e53040bfcc', '6272088872', '2026-05-29 16:01:09'),
('5cadf67ffe53386f08a10f0a746030b68e6bf91ca858da5e0330819de6817a24', '5429303364', '2026-05-30 22:05:56'),
('5def0d5310c5a92ace843a556a4e9a2d343aeab5f3ef92ef1e98a2a8b72d2dac', '6272088872', '2026-05-29 20:15:30'),
('755985f8a9a36927c37ee4b0a4e83b043ef6248559e5a3ce4d66fe0d5692f8c0', '6272088872', '2026-06-01 21:32:06'),
('76eae58d12b9d607823d6912b4d3e7f5843cf366f0625e16aabda39f852a1185', '6272088872', '2026-05-29 21:03:51'),
('95fb1c76a430093c8eec9fd106927ee95ad929da2e57d34806b006a350d4ea54', '6272088872', '2026-06-01 19:17:10'),
('9baee11b1676a56970c9778e5f82b69e29b8b123af930b7dae10a57eadbaebec', '6272088872', '2026-05-29 04:54:08'),
('a6e8bf057f753eebf7afd76f94d03155a523d6f358a13b6eead016658e8dddac', '6272088872', '2026-05-29 04:55:34'),
('ad4cd17f3a8736cb08046a970c2cb596bb7e4ef1818abe13285992bff6905fc5', '6272088872', '2026-06-01 19:17:20'),
('addf9945497dfbd7250702bfb4fa75ddfe902caab28da853b7825ff37dce6f89', '6272088872', '2026-06-01 21:33:31'),
('b8d51a0152e0d2be354a015b7cb66ff20a4ce2a4e85e33378f66e347cb5ee8e0', '6272088872', '2026-05-31 20:46:39'),
('bc185d67b2e41161f56c264d3a87972bb823888c8791e8c4b50afcff44be549d', '6272088872', '2026-05-31 20:05:29'),
('bf3af10fd8aa37165c88fb610339d2e5ac7e3c1330876b54ea933eb4f9bec15a', '6272088872', '2026-05-31 21:02:13'),
('c9a5c0c4db514c663d1053c7bd560d1f915672f5582fd1d58e58231631399c7b', '5429303364', '2026-05-29 21:12:17'),
('cf1b8d8ca37084f7f403e9878f32daec80a8bffc826d1814dfff5ac644e73df6', '6272088872', '2026-05-29 16:01:23'),
('d71dbc8f0c6b31ee266c8899e654568b754578ab3a98fe616f045d2787e90818', '5429303364', '2026-05-30 22:08:56'),
('d7aac497e4124e1e33e817a3b4345057676c863792e7f945c85517b8bca77c4c', '6272088872', '2026-05-29 20:54:20'),
('daff705460c52a23f971ae09acbc2b41825e1029d6085315c7a4d8c17b1c27aa', '6272088872', '2026-05-29 16:16:58'),
('e1c2e73904c77c4028fd8a2b2a08f0eae768dccd729271beeefd1f384d90b7d0', '6272088872', '2026-06-01 20:16:56'),
('e55dc1ec9e021ad3efb0cd900f9fed7e2f74972993934d1377b2f008c9ae8d56', '6272088872', '2026-05-31 20:05:08'),
('e6fe88d7350df8177a34b6a8ff696a1ea79f3d52dee0c694ac20b50d25384cf4', '6272088872', '2026-05-29 20:10:01'),
('f10945e08f761da83c0c6e4d0ff453b3d977aaac2bcb36163c579f7d95ef4a5c', '6272088872', '2026-05-29 15:56:05'),
('fa7c95e60ceff77468009b3836f422315fb99a86f7569093e55cb94dcf614e7f', '6272088872', '2026-05-31 20:04:22');

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

--
-- Estructura de tabla para la tabla `credit_logs`
--

CREATE TABLE `credit_logs` (
  `id` int(11) NOT NULL,
  `user_id` varchar(50) NOT NULL,
  `amount` int(11) NOT NULL,
  `reason` text NOT NULL,
  `card` varchar(50) DEFAULT NULL,
  `date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estructura de tabla para la tabla `gateways`
--

CREATE TABLE `gateways` (
  `id` int(11) NOT NULL,
  `nombre` varchar(255) NOT NULL,
  `pasarela` varchar(255) NOT NULL,
  `tipo` enum('Auth','CCN','Charged','Mass') NOT NULL,
  `status` varchar(50) DEFAULT 'On ✅',
  `ejemplo` text DEFAULT NULL,
  `type` varchar(100) DEFAULT NULL,
  `comando` varchar(100) DEFAULT NULL,
  `reason` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `min_rank` int(11) DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `gateways`
--

INSERT INTO `gateways` (`id`, `nombre`, `pasarela`, `tipo`, `status`, `ejemplo`, `type`, `comando`, `reason`, `created_at`, `min_rank`) VALUES
(30, 'Kaguya', 'Zuora Stripe', 'Auth', 'On ✅', '/kg cc|mm|yy|cvv', NULL, '/kg', 'Tiene captcha el hdp', '2026-05-27 21:24:31', 1),
(32, 'Moneris Auth', 'Moneris', 'Auth', 'Off ❌', '/mn cc|mm|yy|cvv', NULL, '/mn', 'Se murió esa verga', '2026-05-27 23:46:00', 2),
(34, 'Braintree 36$', 'Braintree', 'Auth', 'On ✅', '/b36 cc|mm|yy|cvv', NULL, '/b36', NULL, '2026-05-27 23:52:15', 2),
(36, 'Zuora Adyen', 'Zuora Adyen', 'Auth', 'On ✅', '/zuo cc|mm|yy|cvv', NULL, '/zuo', NULL, '2026-05-28 18:44:59', 2),
(37, 'Paypal', 'Paypal Charged', 'Charged', 'On ✅', '/pp cc|mm|yy|cvv', NULL, '/pp', NULL, '2026-05-28 19:03:03', 1),
(41, 'Adyen Charged', 'Adyen', 'Charged', 'On ✅', '/adc cc|mm|yy|cvv', NULL, '/adc', NULL, '2026-05-29 04:56:41', 2);

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

--
-- Estructura de tabla para la tabla `keys`
--

CREATE TABLE `keys` (
  `id` int(11) NOT NULL,
  `key_value` varchar(100) NOT NULL,
  `uses_left` int(11) NOT NULL DEFAULT 1,
  `plan_type` int(11) NOT NULL DEFAULT 2,
  `expires_at` datetime DEFAULT NULL,
  `redeemed_by` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estructura de tabla para la tabla `tools`
--

CREATE TABLE `tools` (
  `id` int(11) NOT NULL,
  `tool_id` varchar(50) DEFAULT NULL,
  `nombre` varchar(100) NOT NULL,
  `format` text DEFAULT NULL,
  `status` varchar(20) DEFAULT 'On ✅',
  `comment` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `min_rank` int(11) DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `tools`
--

INSERT INTO `tools` (`id`, `tool_id`, `nombre`, `format`, `status`, `comment`, `created_at`, `min_rank`) VALUES
(15, '/bin', 'Bin Lookup', '/bin 458444', 'On ', '', '2026-05-26 19:39:41', 1),
(16, '/gen', 'Gen Cards', '/gen 458444', 'On ', '', '2026-05-26 19:39:57', 1),
(17, '/addr', 'Random Adress Gen', '/addr mx', 'On ', '', '2026-05-26 19:48:43', 1),
(18, '/site', 'Info/Lookup Site', '/site + url', 'On ', '', '2026-05-26 19:51:27', 1),
(19, '/vbv', 'VBV Lookup', '/vbv + cardFormat', 'On ', '', '2026-05-27 23:31:25', 1),
(20, '/genc', 'Amazon Cookies', '/genc', 'On ', NULL, '2026-05-28 20:04:50', 2),
(21, '/pf', 'Consulta Colombia', '/pf [cc]', 'On ', NULL, '2026-05-28 20:12:18', 1),
(22, '/ban', 'Global Ban', '/ban ID|Reason|Time', 'On ', NULL, '2026-05-28 21:02:37', 4),
(23, '/warn', 'User Warn', '/warn ID|Reason', 'On ', NULL, '2026-05-28 21:02:37', 4),
(24, '/mute', 'User Mute', '/mute ID|Time', 'On ', NULL, '2026-05-28 21:02:37', 4),
(25, '/unban', 'Global Unban', '/unban ID', 'On ', NULL, '2026-05-28 21:02:37', 4),
(26, '/unmute', 'User Unmute', '/unmute ID', 'On ', NULL, '2026-05-28 21:02:37', 4),
(27, '/addcc', 'Add CrediCookies', '/addcc ID|Amount', 'On ', NULL, '2026-05-28 21:02:37', 5),
(28, '/vnz', 'Consulta Venezuela', '.vnz <cedula>', 'On ', NULL, '2026-05-28 21:07:47', 2),
(29, '/mail', 'Temp Email (OTP)', '.mail gen|list', 'On ', NULL, '2026-05-28 21:07:47', 2);

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

--
-- Estructura Stand-in para la vista `vw_gateway_summary`
-- (Véase abajo para la vista actual)
--
CREATE TABLE `vw_gateway_summary` (
`tipo` enum('Auth','CCN','Charged','Mass')
,`total` bigint(21)
,`total_on` decimal(22,0)
,`total_off` decimal(22,0)
);

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

--
-- Estructura Stand-in para la vista `vw_user_stats`
-- (Véase abajo para la vista actual)
--
CREATE TABLE `vw_user_stats` (
`Rank_Name` varchar(100)
,`total_users` bigint(21)
,`banned_users` decimal(22,0)
,`muted_users` decimal(22,0)
);

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

--
-- Estructura para la vista `vw_gateway_summary`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`ryasgremory`@`%` SQL SECURITY DEFINER VIEW `vw_gateway_summary`  AS SELECT `gateways`.`tipo` AS `tipo`, count(0) AS `total`, sum(case when `gateways`.`status` = 'On ✅' then 1 else 0 end) AS `total_on`, sum(case when `gateways`.`status` <> 'On ✅' then 1 else 0 end) AS `total_off` FROM `gateways` GROUP BY `gateways`.`tipo` ;

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

--
-- Estructura para la vista `vw_user_stats`
--

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `antispam`
--
ALTER TABLE `antispam`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `userid` (`userid`),
  ADD KEY `idx_userid_antispam` (`userid`);

--
-- Indices de la tabla `bin_security`
--
ALTER TABLE `bin_security`
  ADD PRIMARY KEY (`bin`);

--
-- Indices de la tabla `cards_checked`
--
ALTER TABLE `cards_checked`
  ADD PRIMARY KEY (`card_hash`);

--
-- Indices de la tabla `credit_logs`
--
ALTER TABLE `credit_logs`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `gateways`
--
ALTER TABLE `gateways`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_tipo_gateways` (`tipo`),
  ADD KEY `idx_status_gateways` (`status`);

--
-- Indices de la tabla `keys`
--
ALTER TABLE `keys`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `key_value` (`key_value`);

--
-- Indices de la tabla `tools`
--
ALTER TABLE `tools`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `tool_id` (`tool_id`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `antispam`
--
ALTER TABLE `antispam`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `credit_logs`
--
ALTER TABLE `credit_logs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `gateways`
--
ALTER TABLE `gateways`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=42;

--
-- AUTO_INCREMENT de la tabla `keys`
--
ALTER TABLE `keys`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `tools`
--
ALTER TABLE `tools`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;
COMMIT;

