CREATE TABLE `companies` (
    `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
    `legal_name` varchar(255) NOT NULL,
    `trade_name` varchar(255) DEFAULT NULL,
    `tin` varchar(255) DEFAULT NULL,
    `slug` varchar(255) NOT NULL,
    `email` varchar(255) DEFAULT NULL,
    `phone` varchar(255) DEFAULT NULL,
    `website` varchar(255) DEFAULT NULL,
    `status` varchar(255) NOT NULL,
    `created_at` datetime NOT NULL,
    `updated_at` datetime NOT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `uq_companies_slug` (`slug`),
    KEY `idx_companies_status` (`status`),
    KEY `idx_companies_tin` (`tin`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;