CREATE TABLE symbols (
    id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    symbol VARCHAR(20) NOT NULL UNIQUE,
    display_name VARCHAR(100) NOT NULL,
    asset_type ENUM('FOREX', 'METAL') NOT NULL DEFAULT 'FOREX',
    base_currency VARCHAR(10) DEFAULT NULL,
    quote_currency VARCHAR(10) DEFAULT NULL,
    pip_size DECIMAL(12,6) NOT NULL DEFAULT 0.0001,
    decimals TINYINT UNSIGNED NOT NULL DEFAULT 5,
    contract_size DECIMAL(18,2) NOT NULL DEFAULT 100000.00,
    tick_value DECIMAL(18,6) DEFAULT NULL,
    is_active TINYINT(1) NOT NULL DEFAULT 1,
    sort_order INT UNSIGNED NOT NULL DEFAULT 0,
    created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
);

INSERT INTO symbols 
(symbol, display_name, asset_type, base_currency, quote_currency, pip_size, decimals, contract_size, sort_order)
VALUES
('EURUSD', 'Euro / US Dollar', 'FOREX', 'EUR', 'USD', 0.0001, 5, 100000, 1),
('GBPUSD', 'British Pound / US Dollar', 'FOREX', 'GBP', 'USD', 0.0001, 5, 100000, 2),
('USDJPY', 'US Dollar / Japanese Yen', 'FOREX', 'USD', 'JPY', 0.01, 3, 100000, 3),
('AUDUSD', 'Australian Dollar / US Dollar', 'FOREX', 'AUD', 'USD', 0.0001, 5, 100000, 4),
('USDCAD', 'US Dollar / Canadian Dollar', 'FOREX', 'USD', 'CAD', 0.0001, 5, 100000, 5),
('USDCHF', 'US Dollar / Swiss Franc', 'FOREX', 'USD', 'CHF', 0.0001, 5, 100000, 6),
('NZDUSD', 'New Zealand Dollar / US Dollar', 'FOREX', 'NZD', 'USD', 0.0001, 5, 100000, 7),
('XAUUSD', 'Gold / US Dollar', 'METAL', 'XAU', 'USD', 0.10, 2, 100, 8);