CREATE DATABASE IF NOT EXISTS `samsung_vip_wheel`;
USE `samsung_vip_wheel`;

CREATE TABLE `settings` (
  `key` VARCHAR(50) PRIMARY KEY,
  `value` TEXT NOT NULL
);

CREATE TABLE `winners` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `name` VARCHAR(255) NOT NULL,
  `address` TEXT NOT NULL,
  `email` VARCHAR(255) NOT NULL,
  `prize` VARCHAR(100) NOT NULL,
  `date` DATETIME DEFAULT CURRENT_TIMESTAMP,
  `paid_status` ENUM('pending', 'paid') DEFAULT 'pending'
);

INSERT INTO `settings` (`key`, `value`) VALUES
('shipping_fee_usd', '7'),
('btc_amount', '0.00012'),
('btc_address', 'bc1qxy2kdv9y2x0z0z0z0z0z0z0z0z0z0z0z0z0z'), -- CHANGE THIS
('qr_code_url', 'https://via.placeholder.com/300x300/FFD700/000000?text=BTC+QR'),
('admin_email', 'admin@yourcompany.com');