-- MySQL dump 10.13  Distrib 9.7.0, for Linux (x86_64)
--
-- Host: localhost    Database: goparts
-- ------------------------------------------------------
-- Server version	9.7.0

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
SET @MYSQLDUMP_TEMP_LOG_BIN = @@SESSION.SQL_LOG_BIN;
SET @@SESSION.SQL_LOG_BIN= 0;

--
-- GTID state at the beginning of the backup 
--

SET @@GLOBAL.GTID_PURGED=/*!80000 '+'*/ '4734f516-4e51-11f1-8c7a-7cc255ec6444:1-361541488,
6b986e56-b38b-11ef-950d-3cecefe322c9:1-1723153791';

--
-- Table structure for table `order_monitoring`
--

DROP TABLE IF EXISTS `order_monitoring`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_monitoring` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` int unsigned NOT NULL,
  `order_item_id` int unsigned DEFAULT NULL,
  `shipment_id` int unsigned DEFAULT NULL,
  `carrier_status` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `carrier_status_detail` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `carrier_pickup_at` timestamp NULL DEFAULT NULL,
  `carrier_delivery_at` timestamp NULL DEFAULT NULL,
  `carrier_eta` timestamp NULL DEFAULT NULL,
  `carrier_checked_at` timestamp NULL DEFAULT NULL,
  `days_in_transit` int DEFAULT NULL,
  `delay_cause` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `delay_days` int NOT NULL DEFAULT '0',
  `status` enum('monitoring','flagged','action_needed','escalated','resolved','closed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'monitoring',
  `remarks` text COLLATE utf8mb4_unicode_ci,
  `follow_up_date` date DEFAULT NULL,
  `resolution` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `resolution_notes` text COLLATE utf8mb4_unicode_ci,
  `resolved_at` timestamp NULL DEFAULT NULL,
  `queue_cleared_at` timestamp NULL DEFAULT NULL,
  `queue_cleared_by` int unsigned DEFAULT NULL,
  `assigned_to` int unsigned DEFAULT NULL,
  `assigned_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_order_id` (`order_id`),
  KEY `idx_status` (`status`),
  KEY `idx_carrier_status` (`carrier_status`),
  KEY `idx_follow_up` (`follow_up_date`),
  KEY `idx_delay_cause` (`delay_cause`),
  KEY `idx_assigned_to` (`assigned_to`),
  KEY `idx_order_item` (`order_id`,`order_item_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9363 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
SET @@SESSION.SQL_LOG_BIN = @MYSQLDUMP_TEMP_LOG_BIN;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2026-07-06  5:00:41
