-- Table support_chat : messages du chat de support
CREATE TABLE IF NOT EXISTS support_chat (
    id INT AUTO_INCREMENT PRIMARY KEY,
    user_name VARCHAR(100) NOT NULL,
    user_email VARCHAR(150),
    message TEXT NOT NULL,
    admin_reply TEXT,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    replied_at DATETIME NULL,
    status ENUM('open','closed') DEFAULT 'open',
    ip_address VARCHAR(45),
    user_agent VARCHAR(255)
);
