CREATE TABLE IF NOT EXISTS `tbltenant_client_portal_config` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint(20) unsigned NOT NULL DEFAULT 1,
  `custom_domain` varchar(255) DEFAULT NULL,
  `domain_fragments` TEXT NOT NULL, 
  `custom_protocol` varchar(15) DEFAULT NULL,
  `ssl_status` enum('pending','enabled','ip_based','to_be_deleted','failed') DEFAULT 'pending',
  `domain_status` ENUM('verified','unverified') DEFAULT 'unverified',
  `added_by` bigint UNSIGNED NOT NULL,
  `added_on` datetime DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  `is_active` tinyint DEFAULT 1,
   PRIMARY KEY (`id`),
   KEY `tenant_id` (`tenant_id`),
   KEY `custom_domain` (`custom_domain`),
   KEY `ssl_status` (`ssl_status`),
   KEY `domain_status` (`domain_status`),
   KEY `is_active` (`is_active`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

