CREATE TABLE IF NOT EXISTS `helpdesk_software_products` (
    `id`              BIGINT UNSIGNED  NOT NULL AUTO_INCREMENT,
    `code`            VARCHAR(30)      NOT NULL,
    `bc_description`  VARCHAR(255)     NOT NULL DEFAULT '',
    `name`            VARCHAR(255)     NOT NULL DEFAULT '',
    `active`          TINYINT(1)       NOT NULL DEFAULT 1,
    `synced_at`       DATETIME         NULL     DEFAULT NULL,
    `created_at`      DATETIME         NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at`      DATETIME         NULL     DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`),
    UNIQUE KEY `uniq_hsp_code` (`code`),
    KEY `idx_hsp_active` (`active`),
    KEY `idx_hsp_synced_at` (`synced_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
