-- https://www.phpmyadmin.net/
--
-- مضيف: localhost:3306
-- وقت الجيل: 24 ديسمبر 2025 الساعة 12:31
-- إصدار الخادم: 10.11.15-MariaDB
-- نسخة PHP: 8.4.16

START TRANSACTION;



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

--
-- بنية الجدول `deposits`
--

CREATE TABLE `deposits` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `txid` varchar(100) DEFAULT NULL,
  `status` enum('pending','approved','rejected') DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- إرجاع أو استيراد بيانات الجدول `deposits`
--

INSERT INTO `deposits` (`id`, `user_id`, `amount`, `txid`, `status`) VALUES
(1, 1, 10.00, '30655665', 'approved'),
(2, 2, 10.00, '586686', 'approved'),
(3, 1, 10.00, 'YYxg4b2EHB8fwDD@', 'approved'),
(4, 1, 10.00, 'Hook', 'approved');

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

--
-- بنية الجدول `packages`
--

CREATE TABLE `packages` (
  `id` int(11) NOT NULL,
  `name` varchar(50) DEFAULT NULL,
  `price` decimal(10,2) DEFAULT NULL,
  `daily_profit` decimal(10,2) DEFAULT NULL,
  `days` int(11) DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- إرجاع أو استيراد بيانات الجدول `packages`
--

INSERT INTO `packages` (`id`, `name`, `price`, `daily_profit`, `days`, `image`) VALUES
(2, 'Vip', 10.00, 3.00, 13, 'https://a.top4top.io/p_3645choxk0.png'),
(3, 'VFerr', 3.00, 1.00, 30, 'https://a.top4top.io/p_3645choxk0.png');

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

--
-- بنية الجدول `settings`
--

CREATE TABLE `settings` (
  `id` int(11) NOT NULL,
  `deposit_address` varchar(255) DEFAULT NULL,
  `referral_percent` int(11) DEFAULT NULL,
  `currency` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- إرجاع أو استيراد بيانات الجدول `settings`
--

INSERT INTO `settings` (`id`, `deposit_address`, `referral_percent`, `currency`) VALUES
(1, 'TEpxrEVZU9ohb8epmWMMzuzhH7Dr8Dx8Y7', 5, 'USD');

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

--
-- بنية الجدول `user_packages`
--

CREATE TABLE `user_packages` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `package_id` int(11) DEFAULT NULL,
  `completed` int(11) DEFAULT 0,
  `last_claim` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- إرجاع أو استيراد بيانات الجدول `user_packages`
--

INSERT INTO `user_packages` (`id`, `user_id`, `package_id`, `completed`, `last_claim`) VALUES
(1, 1, 1, 4, 1766570868),
(2, 1, 3, 1, 1766570868);

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

--
-- Stand-in structure for view `vip`
-- (See below for the actual view)
--
CREATE TABLE `vip` (
`id` int(11)
,`name` varchar(50)
,`price` decimal(10,2)
,`daily_profit` decimal(10,2)
,`days` int(11)
);

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

--
-- بنية الجدول `withdrawals`
--

CREATE TABLE `withdrawals` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `status` enum('pending','approved','rejected') DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- فهارس للجدول `deposits`
--
ALTER TABLE `deposits`
  ADD PRIMARY KEY (`id`);

--
-- فهارس للجدول `packages`
--
ALTER TABLE `packages`
  ADD PRIMARY KEY (`id`);

--
-- فهارس للجدول `settings`
--
ALTER TABLE `settings`
  ADD PRIMARY KEY (`id`);

--
-- فهارس للجدول `user_packages`
--
ALTER TABLE `user_packages`
  ADD PRIMARY KEY (`id`);

--
-- فهارس للجدول `withdrawals`
--
ALTER TABLE `withdrawals`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

--
-- AUTO_INCREMENT for table `withdrawals`
--
ALTER TABLE `withdrawals`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

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

--
-- Structure for view `vip`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`attcorpo`@`localhost` SQL SECURITY DEFINER VIEW `vip`  AS SELECT `packages`.`id` AS `id`, `packages`.`name` AS `name`, `packages`.`price` AS `price`, `packages`.`daily_profit` AS `daily_profit`, `packages`.`days` AS `days` FROM `packages` ;
COMMIT;

