CREATE TABLE IF NOT EXISTS demo_fund_applications (
    id INT AUTO_INCREMENT PRIMARY KEY,
    user_id INT NOT NULL,
    requested_amount DECIMAL(15, 2) NOT NULL,
    purpose VARCHAR(50) NOT NULL,
    trading_experience VARCHAR(50) NOT NULL,
    risk_tolerance VARCHAR(50) NOT NULL,
    additional_notes TEXT,
    status ENUM('pending', 'approved', 'rejected') DEFAULT 'pending',
    approved_amount DECIMAL(15, 2) DEFAULT NULL,
    admin_notes TEXT,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    FOREIGN KEY (user_id) REFERENCES users(id)
);
