-- WinGo 1-Minute Setup SQL
-- Run this on your database to add 1-minute WinGo support
-- Uses the SAME wingo_pool as 30s WinGo

CREATE TABLE IF NOT EXISTS `wingo_bets_1min` (
    `id` INT AUTO_INCREMENT PRIMARY KEY,
    `user_id` INT NOT NULL,
    `period` VARCHAR(20) NOT NULL,
    `bet_on` VARCHAR(10) NOT NULL,
    `amount` DECIMAL(12,2) NOT NULL DEFAULT 0.00,
    `status` ENUM('pending','win','loss') NOT NULL DEFAULT 'pending',
    `payout` DECIMAL(12,2) NOT NULL DEFAULT 0.00,
    `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    INDEX `idx_period` (`period`),
    INDEX `idx_user_id` (`user_id`),
    INDEX `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS `wingo_results_1min` (
    `id` INT AUTO_INCREMENT PRIMARY KEY,
    `period` VARCHAR(20) NOT NULL,
    `number` TINYINT NOT NULL,
    `color` VARCHAR(15) NOT NULL,
    `size` VARCHAR(5) NOT NULL,
    `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    UNIQUE KEY `period` (`period`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
