-- phpMyAdmin SQL Dump
-- version 5.2.3
-- https://www.phpmyadmin.net/
--
-- مضيف: localhost:3306
-- وقت الجيل: 22 سبتمبر 2026 الساعة 11:17
-- إصدار الخادم: 11.4.13-MariaDB-cll-lve
-- نسخة PHP: 8.4.24

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 */;

--
-- قاعدة بيانات: `jssaafiq_short`
--

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

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

CREATE TABLE `statistics` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `link_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
  `user_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
  `referral_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
  `ad_type` int(2) UNSIGNED NOT NULL DEFAULT 1 COMMENT '0=direct, 1=inter., 2=banner',
  `campaign_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
  `campaign_user_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
  `campaign_item_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
  `ip` varchar(45) NOT NULL DEFAULT '',
  `country` varchar(6) NOT NULL DEFAULT '',
  `owner_earn` decimal(50,9) NOT NULL DEFAULT 0.000000000,
  `publisher_earn` decimal(50,9) NOT NULL DEFAULT 0.000000000,
  `referral_earn` decimal(50,9) NOT NULL DEFAULT 0.000000000,
  `referer_domain` varchar(256) NOT NULL DEFAULT '',
  `referer` varchar(256) NOT NULL DEFAULT '',
  `user_agent` text DEFAULT NULL,
  `reason` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '1=Earn, 2=Disabled cookie, 3=Anonymous user, 4=Adblock, 5=Proxy, 6=IP changed, 7=Not unique, 8=Full weight, 9=Default campaign, 10=direct, 11=Invalid country, 12=Earnings disabled, 13=User disabled earnings, 14=Blocked referer domain, 15=Reached the hourly limit, 16=Reached the daily limit, 17=Reached the monthly limit',
  `created` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

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

INSERT INTO `statistics` (`d`, `COUNT(*)`) VALUES
('2026-08-26', 1),
('2026-09-10', 9),
('2026-09-11', 6),
('2026-09-12', 9),
('2026-09-13', 10),
('2026-09-14', 13),
('2026-09-15', 41),
('2026-09-16', 3),
('2026-09-17', 2),
('2026-09-18', 3),
('2026-09-19', 6),
('2026-09-20', 3),
('2026-09-21', 2);

--
-- Indexes for dumped tables
--

--
-- فهارس للجدول `statistics`
--
ALTER TABLE `statistics`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_userid` (`user_id`),
  ADD KEY `idx_ip` (`ip`),
  ADD KEY `idx_campaignid_userid` (`campaign_id`,`user_id`),
  ADD KEY `idx_referralid` (`referral_id`),
  ADD KEY `idx_created_userid` (`created`,`user_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `statistics`
--
ALTER TABLE `statistics`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=182304;
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 */;
