CREATE TABLE IF NOT EXISTS reminder_logs (
    id INT AUTO_INCREMENT PRIMARY KEY,
    client_name VARCHAR(255) NULL,
    client_email VARCHAR(255) NULL,
    document_id VARCHAR(100) NULL,
    document_number VARCHAR(255) NULL,
    document_date DATE NULL,
    due_date DATE NULL,
    total DECIMAL(10,2) NULL,
    days_overdue INT NULL,
    alert_level VARCHAR(50) NULL,
    sent_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    status VARCHAR(50) DEFAULT 'logged',
    notes TEXT NULL
);
