CREATE TABLE IF NOT EXISTS allegro_order_status_mappings (
    id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    allegro_status_code VARCHAR(64) NOT NULL,
    allegro_status_name VARCHAR(120) NULL,
    orderpro_status_code VARCHAR(64) NOT NULL,
    created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    UNIQUE KEY allegro_order_status_mappings_code_unique (allegro_status_code),
    KEY allegro_order_status_mappings_orderpro_code_idx (orderpro_status_code)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
