CREATE TABLE IF NOT EXISTS `ContractContactLogs` (
  `ID` INT NOT NULL AUTO_INCREMENT,
  `StoppedContractID` INT NOT NULL,
  `ContID` VARCHAR(100) NULL,
  `CustName` VARCHAR(255) NULL,
  `OwnerPhone` VARCHAR(30) NULL,
  `DelegateName` VARCHAR(255) NULL,
  `DelegatePhone` VARCHAR(30) NULL,
  `ContactedAt` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `Notes` TEXT NULL,
  `EnteredByUserId` INT NULL,
  `EnteredByName` VARCHAR(255) NULL,
  PRIMARY KEY (`ID`),
  KEY `idx_contact_logs_stopped_contract` (`StoppedContractID`),
  KEY `idx_contact_logs_contacted_at` (`ContactedAt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
