CREATE TABLE `lead_logs` (
    `id` INT AUTO_INCREMENT PRIMARY KEY,
    `lead_id` INT DEFAULT NULL,
    `direction` ENUM('in', 'out') NOT NULL,
    `endpoint` VARCHAR(255) NOT NULL,
    `request_data` TEXT,
    `response_data` TEXT,
    `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    INDEX (`lead_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 