-- phpMyAdmin SQL Dump
-- version 5.2.2
-- https://www.phpmyadmin.net/
--
-- Anamakine: localhost:3306
-- Üretim Zamanı: 22 Haz 2026, 01:05:56
-- Sunucu sürümü: 10.5.29-MariaDB-cll-lve
-- PHP Sürümü: 8.4.21

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

--
-- Veritabanı: `radyoho2_okey7`
--

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

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

CREATE TABLE `admin_logs` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `ip_address` varchar(100) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

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

CREATE TABLE `announcements` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `content` longtext NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `status` enum('active','passive') DEFAULT 'active',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_turkish_ci;

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

INSERT INTO `announcements` (`id`, `title`, `content`, `image`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Web Sitemiz çılmıştır', 'web sitemiz acılmısıtr', 'announcement-20260613215729-ef1ef0003a.jpg', 'active', '2026-06-13 18:56:32', '2026-06-13 19:01:02'),
(2, 'Web Sitemiz Açılmıştır', 'test', 'announcement-20260613231622-67db774fc1.jpeg', 'active', '2026-06-13 20:16:22', NULL);

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

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

CREATE TABLE `contact_messages` (
  `id` int(11) NOT NULL,
  `fullname` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `subject` varchar(255) DEFAULT NULL,
  `message` longtext NOT NULL,
  `ip_address` varchar(100) DEFAULT NULL,
  `status` enum('unread','read','answered') DEFAULT 'unread',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_turkish_ci;

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

INSERT INTO `contact_messages` (`id`, `fullname`, `email`, `phone`, `subject`, `message`, `ip_address`, `status`, `created_at`) VALUES
(1, 'aaaaa', 'atakan@radyohost.biz', '123456789', 'aaaaaaa', 'aaaaaaaa', '85.99.182.139', 'read', '2026-06-14 07:12:08'),
(2, 'volkan', 'volkanunall@hotmail.com', '1234567890', 'selam', 'test', '85.100.64.31', 'read', '2026-06-14 20:32:01'),
(4, 'Volkan Ünal', 'volkanunall@hotmail.com', '05412367584', 'Test', 'Test', '85.100.68.102', '', '2026-06-19 22:05:11');

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

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

CREATE TABLE `downloads` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `version` varchar(50) DEFAULT NULL,
  `description` longtext DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `file_path` varchar(255) DEFAULT NULL,
  `file_size` varchar(50) DEFAULT NULL,
  `download_count` int(11) DEFAULT 0,
  `status` enum('active','passive') DEFAULT 'active',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_turkish_ci;

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

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

CREATE TABLE `memberships` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `price` decimal(10,2) DEFAULT 0.00,
  `duration` int(11) DEFAULT 30,
  `features` longtext DEFAULT NULL,
  `status` enum('active','passive') DEFAULT 'active',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_turkish_ci;

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

INSERT INTO `memberships` (`id`, `title`, `price`, `duration`, `features`, `status`, `created_at`) VALUES
(1, 'GOLD PLATİN', 1500.00, 0, NULL, 'active', '2026-06-13 19:52:58');

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

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

CREATE TABLE `okey_managers` (
  `id` int(10) UNSIGNED NOT NULL,
  `title_id` int(10) UNSIGNED DEFAULT NULL,
  `username` varchar(100) NOT NULL,
  `display_name` varchar(150) NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `verified` tinyint(1) NOT NULL DEFAULT 1,
  `status` enum('active','passive') NOT NULL DEFAULT 'active',
  `sort_order` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `okey_managers` (`id`, `title_id`, `username`, `display_name`, `image`, `verified`, `status`, `sort_order`, `created_at`, `updated_at`) VALUES
(2, 1, 'VoLKaN75', 'VoLKaN75', 'uploads/managers/manager-20260621225731-52dc32f1df.jpg', 1, 'active', 1, '2026-06-21 22:57:31', '2026-06-21 23:04:31'),
(3, 2, 'MaTiZz75', 'MaTiZz75', 'uploads/managers/manager-20260622000557-4b3d593dfd.jpg', 1, 'active', 2, '2026-06-22 00:05:57', NULL);

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

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

CREATE TABLE `okey_manager_titles` (
  `id` int(10) UNSIGNED NOT NULL,
  `title_name` varchar(150) NOT NULL,
  `icon` varchar(20) NOT NULL DEFAULT '?',
  `status` enum('active','passive') NOT NULL DEFAULT 'active',
  `sort_order` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `okey_manager_titles` (`id`, `title_name`, `icon`, `status`, `sort_order`, `created_at`) VALUES
(1, 'Platform Sahibi', '👑', 'active', 1, '2026-06-21 22:11:49'),
(2, 'Genel Yönetici', '🛡️', 'active', 2, '2026-06-21 22:11:49'),
(3, 'Baş Yönetici', '⭐', 'active', 3, '2026-06-21 22:11:49'),
(4, 'Gold Yönetici', '🥇', 'active', 4, '2026-06-21 22:11:49'),
(5, 'Premium Yönetici', '💎', 'active', 5, '2026-06-21 22:11:49'),
(6, 'VIP Yönetici', '👑', 'active', 6, '2026-06-21 22:11:49'),
(7, 'Oyun Yöneticisi', '🎮', 'active', 7, '2026-06-21 22:11:49'),
(8, 'Sohbet Yöneticisi', '💬', 'active', 8, '2026-06-21 22:11:49'),
(9, 'Moderasyon Sorumlusu', '⚡', 'active', 9, '2026-06-21 22:11:49'),
(10, 'Etkinlik ve Turnuva Sorumlusu', '🏆', 'active', 10, '2026-06-21 22:11:49'),
(11, 'Destek Sorumlusu', '📞', 'active', 11, '2026-06-21 22:11:49');

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

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

CREATE TABLE `packages` (
  `id` int(11) NOT NULL,
  `package_type` enum('gold','premium','vip') NOT NULL,
  `title` varchar(150) NOT NULL,
  `amount` int(11) NOT NULL DEFAULT 0,
  `price` decimal(10,2) NOT NULL DEFAULT 0.00,
  `duration` varchar(50) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` enum('active','passive') NOT NULL DEFAULT 'active',
  `created_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `packages` (`id`, `package_type`, `title`, `amount`, `price`, `duration`, `description`, `status`, `created_at`) VALUES
(1, 'gold', 'Gold Başlangıç', 1000, 99.00, '30 Gün', 'Başlangıç seviyesi Gold paketi.', 'active', '2026-06-14 20:16:47'),
(2, 'gold', 'Gold Plus', 2500, 199.00, '30 Gün', 'Daha fazla Gold isteyen üyeler için.', 'active', '2026-06-14 20:16:47'),
(3, 'gold', 'Gold Ultra', 5000, 349.00, '30 Gün', 'Üst seviye Gold üyelik paketi.', 'active', '2026-06-14 20:16:47'),
(4, 'premium', 'Premium Başlangıç', 0, 299.00, '30 Gün', 'Başlangıç Premium üyelik paketi.', 'active', '2026-06-14 20:16:47'),
(5, 'premium', 'Premium Plus', 0, 499.00, '30 Gün', 'Gelişmiş Premium üyelik paketi.', 'active', '2026-06-14 20:16:47'),
(6, 'premium', 'Premium Ultra', 0, 699.00, '30 Gün', 'Üst seviye Premium üyelik paketi.', 'active', '2026-06-14 20:16:47'),
(7, 'vip', 'VIP Başlangıç', 0, 799.00, '30 Gün', 'Başlangıç VIP üyelik paketi.', 'active', '2026-06-14 20:16:47'),
(8, 'vip', 'VIP Plus', 0, 999.00, '30 Gün', 'Gelişmiş VIP üyelik paketi.', 'active', '2026-06-14 20:16:47'),
(9, 'vip', 'VIP Ultra', 0, 1499.00, '30 Gün', 'En üst seviye VIP üyelik paketi.', 'active', '2026-06-14 20:16:47');

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

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

CREATE TABLE `settings` (
  `id` int(11) NOT NULL,
  `setting_key` varchar(191) NOT NULL,
  `setting_value` longtext DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_turkish_ci;

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

INSERT INTO `settings` (`id`, `setting_key`, `setting_value`, `created_at`, `updated_at`) VALUES
(1, 'site_name', '101 BATMAN', '2026-06-13 19:57:47', '2026-06-14 23:04:02'),
(2, 'site_title', 'Premium Okey Portalı', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(3, 'site_description', 'Türkiye\'nin Premium Okey ve Sohbet Platformu', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(4, 'site_keywords', 'okey,okey101,premium okey,online okey,sohbet', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(5, 'site_email', 'info@okey101.com', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(6, 'site_phone', '', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(7, 'site_whatsapp', '905415917536', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(8, 'site_url', 'https://radyo2.radyohost.biz', '2026-06-13 19:57:47', '2026-06-13 20:03:29'),
(9, 'footer_text', 'Powered By RadyoHost.BiZ Web Teknolojileri', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(10, 'admin_theme', 'premium', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(11, 'admin_logo', '', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(12, 'admin_favicon', '', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(13, 'admin_login_logo', '', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(14, 'maintenance_mode', '0', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(15, 'register_status', '1', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(16, 'login_status', '1', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(17, 'facebook_url', '', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(18, 'instagram_url', '', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(19, 'youtube_url', '', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(20, 'tiktok_url', '', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(21, 'discord_url', '', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(22, 'smtp_host', '', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(23, 'smtp_port', '587', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(24, 'smtp_username', '', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(25, 'smtp_password', '', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(26, 'smtp_secure', 'tls', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(27, 'seo_author', 'VoLKaN75', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(28, 'seo_robots', 'index,follow', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(29, 'google_analytics', '', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(30, 'google_verification', '', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(31, 'meta_title', 'Premium Okey Portalı', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(32, 'meta_description', 'Premium Okey ve Sohbet Platformu', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(33, 'meta_keywords', 'okey,online okey,premium okey', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(34, 'copyright_text', '© 2026 Okey101', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(35, 'developer_name', 'VoLKaN75', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(36, 'developer_whatsapp', '905415917536', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(37, 'currency', 'TRY', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(38, 'timezone', 'Europe/Istanbul', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(39, 'language', 'tr', '2026-06-13 19:57:47', '2026-06-13 19:57:47'),
(40, 'version', '1.0.0', '2026-06-13 19:57:47', '2026-06-13 19:57:47');

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

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

CREATE TABLE `site_ads` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `button_text` varchar(100) DEFAULT 'Oyunu İndir',
  `button_url` varchar(255) DEFAULT 'downloads.php',
  `second_button_text` varchar(100) DEFAULT 'Üye Ol',
  `second_button_url` varchar(255) DEFAULT 'register.php',
  `sort_order` int(11) DEFAULT 0,
  `status` enum('active','passive') DEFAULT 'active',
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `site_ads` (`id`, `title`, `description`, `image`, `button_text`, `button_url`, `second_button_text`, `second_button_url`, `sort_order`, `status`, `created_at`, `updated_at`) VALUES
(2, '📻 RadyoHost.BiZ | Radyo Hosting & Web Teknolojileri', 'Shoutcast, Icecast, AutoDJ Sistemleri, Kurumsal Web Tasarım ve Profesyonel Teknik Destek Çözümleri.', 'uploads/ads/ad-20260619004815-696fce9a.png', 'Web Sitemiz', 'https://radyohost.biz', 'Üye Ol', 'register.php', 1, 'active', '2026-06-19 00:48:15', '2026-06-19 00:48:15'),
(3, '📻 RadyoHost.BiZ | Radyo Hosting & Web Teknolojileri', 'Shoutcast • Icecast • AutoDJ • Web Tasarım • Yazılım Çözümleri', 'uploads/ads/ad-20260619011329-abfdc84e.png', 'Web Sitemiz', 'https://radyohost.biz', 'Üye Ol', 'register.php', 2, 'active', '2026-06-19 01:04:05', '2026-06-19 01:13:29');

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

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

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `name` varchar(120) NOT NULL,
  `username` varchar(80) NOT NULL,
  `email` varchar(160) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `role` enum('admin','user') NOT NULL DEFAULT 'user',
  `status` enum('active','passive') NOT NULL DEFAULT 'active',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_turkish_ci;

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

INSERT INTO `users` (`id`, `name`, `username`, `email`, `phone`, `password`, `image`, `role`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Volkan', 'volkan', 'admin@radyo2.radyohost.biz', NULL, '$2y$10$66vsI/t7ZRFcHHICn6JN0eO1694LP.kRcOYVlksjBhzzfGasRHLya', 'user-20260613200635-1f246031bb.jpg', 'admin', 'active', '2026-06-13 12:06:01', '2026-06-13 17:06:35'),
(2, 'volkan ünal', 'atakan', 'atakan@radyohost.biz', NULL, '$2y$10$3fjfDtWOXR9a.AHQddS67ekz9JtEQYlelBw66LArYdyQrx0BDWpUK', 'manager-20260613225351-058d1d7187.jpg', 'admin', 'active', '2026-06-13 16:18:30', '2026-06-13 19:53:51'),
(3, 'atakann', 'dogan', 'atakann@radyohost.biz', NULL, '$2y$10$evv07qaFcuMC8oLygwat1Odm0EvBn9MYoq1RpTmkPtPMN5g54223G', 'manager-20260613234620-3db599e982.jpg', 'admin', 'active', '2026-06-13 20:46:20', NULL),
(4, 'volkan', 'ada', 'ata@radyohost.biz', '1234567890', '$2y$10$VmlRR0G.8QRErntFdkX6Reb7WLakTQ9TwwNkT8aDHD0AcsNfUnqse', 'user_4_1781554902.jpg', 'user', 'active', '2026-06-13 21:57:23', '2026-06-21 10:13:10');

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

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

CREATE TABLE `user_messages` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `subject` varchar(150) NOT NULL,
  `message` text NOT NULL,
  `status` enum('unread','read') NOT NULL DEFAULT 'unread',
  `created_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `user_packages` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `package_id` int(11) NOT NULL,
  `package_type` enum('gold','premium','vip') NOT NULL,
  `package_name` varchar(150) NOT NULL,
  `start_date` datetime DEFAULT NULL,
  `end_date` datetime DEFAULT NULL,
  `status` enum('active','expired','cancelled') NOT NULL DEFAULT 'active',
  `created_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `user_packages` (`id`, `user_id`, `package_id`, `package_type`, `package_name`, `start_date`, `end_date`, `status`, `created_at`) VALUES
(1, 4, 3, 'gold', 'Gold Ultra', '2026-06-14 11:11:00', '2026-06-30 11:11:00', 'cancelled', '2026-06-14 20:40:38'),
(2, 4, 6, 'premium', 'Premium Ultra', '2026-06-14 11:11:00', '2026-06-30 11:11:00', 'cancelled', '2026-06-14 22:07:50'),
(3, 4, 7, 'vip', 'VIP Başlangıç', '2026-06-16 11:11:00', '2026-06-30 11:11:00', 'cancelled', '2026-06-16 00:09:31'),
(4, 4, 7, 'vip', 'VIP Başlangıç', '2026-06-16 11:11:00', '2026-06-30 11:11:00', 'cancelled', '2026-06-16 00:13:52'),
(5, 4, 6, 'premium', 'Premium Ultra', '2026-06-16 11:11:00', '2026-06-30 11:11:00', 'cancelled', '2026-06-16 01:14:53'),
(6, 4, 6, 'premium', 'Premium Ultra', '2026-06-16 11:11:00', '2026-06-30 11:11:00', 'active', '2026-06-21 13:13:10');

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

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

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

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

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

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

--
-- Tablo için indeksler `okey_managers`
--
ALTER TABLE `okey_managers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_title_id` (`title_id`),
  ADD KEY `idx_status` (`status`),
  ADD KEY `idx_sort_order` (`sort_order`);

--
-- Tablo için indeksler `okey_manager_titles`
--
ALTER TABLE `okey_manager_titles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_status` (`status`),
  ADD KEY `idx_sort_order` (`sort_order`);

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

--
-- Tablo için indeksler `settings`
--
ALTER TABLE `settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `setting_key` (`setting_key`);

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

--
-- Tablo için indeksler `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `username` (`username`),
  ADD KEY `email` (`email`),
  ADD KEY `role` (`role`),
  ADD KEY `status` (`status`);

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

--
-- Tablo için indeksler `user_packages`
--
ALTER TABLE `user_packages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_user_id` (`user_id`),
  ADD KEY `idx_package_id` (`package_id`),
  ADD KEY `idx_status` (`status`);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Tablo kısıtlamaları `okey_managers`
--
ALTER TABLE `okey_managers`
  ADD CONSTRAINT `fk_okey_managers_title` FOREIGN KEY (`title_id`) REFERENCES `okey_manager_titles` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
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 */;
