-- Database snapshot: PROJ_6d7f83d3_snap_20260515_190241_374
-- Created at: 2026-05-15 19:50:30.155531
-- Include structure: True
-- Include data: True


-- Table structure for `_prisma_migrations`
CREATE TABLE `_prisma_migrations` (
  `id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `checksum` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `finished_at` datetime(3) DEFAULT NULL,
  `migration_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `logs` text COLLATE utf8mb4_unicode_ci,
  `rolled_back_at` datetime(3) DEFAULT NULL,
  `started_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `applied_steps_count` int unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data for table `_prisma_migrations`
INSERT INTO `_prisma_migrations` (`id`, `checksum`, `finished_at`, `migration_name`, `logs`, `rolled_back_at`, `started_at`, `applied_steps_count`) VALUES
('6aa3ea40-c042-4ed2-babb-03abb9651533', '84a8474be850b013f25abedda395cc0c771e3b6ed048b98c7deae05e02968a66', '2026-05-15 18:26:14', 'agent_update_1778869572', '', NULL, '2026-05-15 18:26:14', 0),
('8009bf61-5587-4c26-80a3-4f25ae525b0f', 'cee56c8a21ee34661939bbb60f958862a58a7c01fdfcbddfa41a1e47e6336565', '2026-05-15 17:29:45', '20260515172943_init', NULL, NULL, '2026-05-15 17:29:45', 1);

-- Table structure for `account_user`
CREATE TABLE `account_user` (
  `id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `account` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `role` enum('ADMIN') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ADMIN',
  `createdAt` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `updatedAt` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  PRIMARY KEY (`id`),
  UNIQUE KEY `account_user_account_key` (`account`),
  UNIQUE KEY `account_user_email_key` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data for table `account_user`
INSERT INTO `account_user` (`id`, `account`, `password`, `email`, `role`, `createdAt`, `updatedAt`) VALUES
('461c191e-508d-11f1-83b6-02cf0dd0fdc5', 'mishwar', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', 'mishwar@admin.local', 'ADMIN', '2026-05-15 18:38:32', '2026-05-15 18:38:32'),
('8a4046ab-7312-4925-adbc-aa39f223ba72', 'omar_farooq', 'c50d1444b0d66012e228a70e9c9c4ff12adbb63ed6ab8a647cbf83296a94e125', 'omar.farooq@meshwar.iq', 'ADMIN', '2026-05-05 17:31:26', '2026-05-10 17:31:26'),
('909c7e71-9ed7-4129-b13a-63ecfeb92bea', 'ali_ahmed', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', 'ali.ahmed@meshwar.iq', 'ADMIN', '2026-03-31 17:31:26', '2026-04-30 17:31:26'),
('cd61642a-2e07-4b55-816f-682746c72c58', 'zainab_kareem', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', 'zainab.kareem@meshwar.iq', 'ADMIN', '2026-05-10 17:31:26', '2026-05-14 17:31:26'),
('dbc15515-5b8c-4a2a-812f-a7eb747ee136', 'fatima.hassan', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', 'fatima.hassan@meshwar.iq', 'ADMIN', '2026-03-16 17:31:26', '2026-05-13 17:31:26');

-- Table structure for `delivery_order`
CREATE TABLE `delivery_order` (
  `id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `orderNo` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
  `governorateName` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `areaName` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nearestLandmark` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `customerName` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `customerPhone` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
  `driverName` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `orderType` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('PENDING','IN_PROGRESS','DELIVERED','CANCELLED') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'PENDING',
  `createdAt` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `updatedAt` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `totalAmount` decimal(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`id`),
  UNIQUE KEY `delivery_order_orderNo_key` (`orderNo`),
  KEY `delivery_order_status_idx` (`status`),
  KEY `delivery_order_governorateName_idx` (`governorateName`),
  KEY `delivery_order_driverName_idx` (`driverName`),
  KEY `delivery_order_createdAt_idx` (`createdAt`),
  KEY `delivery_order_customerPhone_idx` (`customerPhone`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data for table `delivery_order`
INSERT INTO `delivery_order` (`id`, `orderNo`, `governorateName`, `areaName`, `nearestLandmark`, `customerName`, `customerPhone`, `driverName`, `orderType`, `status`, `createdAt`, `updatedAt`, `totalAmount`) VALUES
('020d12f5-021c-42a5-8e2f-fff87fd61473', 'ORD-2023-1012', 'السليمانية', 'بختياري', 'حديقة آزادي', 'شيرين كمال', '07501112233', 'عمر خالد', 'توصيل وثائق', 'PENDING', '2026-05-10 17:31:26', '2026-05-14 17:31:26', '0.00'),
('056889ac-532f-4655-864f-c1c66f764503', 'ORD-2023-1001', 'بغداد', 'المنصور', 'مول المنصور', 'علي محمد', '07901234567', 'أحمد حسن', 'توصيل سريع', 'PENDING', '2026-05-13 17:31:26', '2026-05-14 17:31:26', '0.00'),
('4553077b-7ea0-474e-9c65-7c2e05dc8859', 'ORD-662249-513', 'كركوك', 'القادسية الثاني', 'حلويات الحلواني', 'احمد علي', '07701031882', 'نوزاد', 'برغر', 'IN_PROGRESS', '2026-05-15 17:37:42', '2026-05-15 17:38:18', '0.00'),
('6df3aa42-c512-4e45-ad3b-cf7c5c013a8b', 'ORD-2023-1002', 'البصرة', 'العشار', 'شارع الوطن', 'سارة جاسم', '07801234567', 'حسين علي', 'توصيل عادي', 'IN_PROGRESS', '2026-04-30 17:31:26', '2026-05-10 17:31:26', '0.00'),
('7df63fed-7631-417b-a48a-f74ab6eed6d4', 'ORD-2023-1010', 'بابل', 'الحلة', 'منتجع بابل', 'هدى جبار', '07801112233', 'عمار سعد', 'توصيل طرود', 'DELIVERED', '2026-05-12 17:31:26', '2026-05-13 17:31:26', '0.00'),
('83873fca-e77a-48bb-9970-a11122b7526b', 'ORD-2023-1004', 'النجف', 'الكوفة', 'مسجد الكوفة', 'محمد مهدي', '07501234567', 'مصطفى كامل', 'توصيل طرود', 'CANCELLED', '2026-05-09 17:31:26', '2026-05-11 17:31:26', '0.00'),
('8f43b83b-e2cf-4287-8a34-4c6a8c2b14fd', 'ORD-2023-1005', 'كربلاء', 'حي الحسين', 'مستشفى الحسين', 'زينب علي', '07907654321', 'رائد سامي', 'توصيل وثائق', 'PENDING', '2026-04-25 17:31:26', '2026-05-05 17:31:26', '0.00'),
('9140a3b1-dc9e-42ec-9e21-f19b6f39e854', 'ORD-2023-1008', 'البصرة', 'الجزائر', 'شارع الاستقلال', 'يوسف ناصر', '07507654321', 'حسين علي', 'توصيل عادي', 'PENDING', '2026-04-20 17:31:26', '2026-04-27 17:31:26', '0.00'),
('b627ce47-8147-40c5-bf9d-133094da4b4c', 'ORD-2023-1009', 'الأنبار', 'الرمادي', 'جامعة الأنبار', 'عمر فاروق', '07901112233', 'ياسر قاسم', 'توصيل طعام', 'IN_PROGRESS', '2026-05-03 17:31:26', '2026-05-07 17:31:26', '0.00'),
('b750e3eb-df28-4661-87e0-f5cdd5388620', 'ORD-2023-1007', 'بغداد', 'الكرادة', 'المسرح الوطني', 'فاطمة زهراء', '07707654321', 'أحمد حسن', 'توصيل هدايا', 'DELIVERED', '2026-03-31 17:31:26', '2026-04-03 17:31:26', '0.00'),
('bedca568-4025-4fc0-83d8-322aed37de3f', 'ORD-2023-1003', 'أربيل', 'عينكاوة', 'كنيسة مار يوسف', 'نور ستار', '07701234567', 'عمر خالد', 'توصيل طعام', 'DELIVERED', '2026-04-05 17:31:26', '2026-04-10 17:31:26', '0.00'),
('d193cdba-7c8b-4ddb-ac38-e8d375d7ae35', 'ORD-2023-1006', 'الموصل', 'الزهور', 'جامعة الموصل', 'فهد عبدالله', '07807654321', 'سالم محمود', 'توصيل سريع', 'IN_PROGRESS', '2026-05-14 17:31:26', '2026-05-15 17:31:26', '0.00'),
('d64abc3c-59e3-44cf-8cee-d773b08fa5de', 'ORD-2023-1011', 'ذي قار', 'الناصرية', 'زقورة أور', 'حيدر سالم', '07701112233', 'ماجد نعيم', 'توصيل سريع', 'PENDING', '2026-04-10 17:31:26', '2026-04-25 17:31:26', '0.00'),
('f9ab5ae0-de1f-492a-8786-0338b3f054f3', 'ORD-126449-547', 'كركوك', 'القادسية الثاني', 'حلويات الحلواني', 'احمد علي عوادددددد', '07701031882', 'نوزاد', 'برغر', 'IN_PROGRESS', '2026-05-15 18:35:26', '2026-05-15 19:06:00', '5000.00');

-- Table structure for `delivery_order_status_history`
CREATE TABLE `delivery_order_status_history` (
  `id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `deliveryOrderId` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `fromStatus` enum('PENDING','IN_PROGRESS','DELIVERED','CANCELLED') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `toStatus` enum('PENDING','IN_PROGRESS','DELIVERED','CANCELLED') COLLATE utf8mb4_unicode_ci NOT NULL,
  `changedById` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `createdAt` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  PRIMARY KEY (`id`),
  KEY `delivery_order_status_history_deliveryOrderId_createdAt_idx` (`deliveryOrderId`,`createdAt`),
  KEY `delivery_order_status_history_toStatus_idx` (`toStatus`),
  KEY `delivery_order_status_history_changedById_fkey` (`changedById`),
  CONSTRAINT `delivery_order_status_history_changedById_fkey` FOREIGN KEY (`changedById`) REFERENCES `account_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `delivery_order_status_history_deliveryOrderId_fkey` FOREIGN KEY (`deliveryOrderId`) REFERENCES `delivery_order` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data for table `delivery_order_status_history`
INSERT INTO `delivery_order_status_history` (`id`, `deliveryOrderId`, `fromStatus`, `toStatus`, `changedById`, `createdAt`) VALUES
('1014a504-6bee-4495-9a53-a05b1c29a39b', 'd193cdba-7c8b-4ddb-ac38-e8d375d7ae35', NULL, 'PENDING', 'cd61642a-2e07-4b55-816f-682746c72c58', '2026-05-14 17:31:26'),
('3e1f10e4-bab9-4b9c-92a1-ef0371da2b30', '8f43b83b-e2cf-4287-8a34-4c6a8c2b14fd', NULL, 'PENDING', '8a4046ab-7312-4925-adbc-aa39f223ba72', '2026-04-25 17:31:26'),
('4178a6f5-366c-455b-b29c-c1cbdad2f52a', '7df63fed-7631-417b-a48a-f74ab6eed6d4', NULL, 'PENDING', '8a4046ab-7312-4925-adbc-aa39f223ba72', '2026-05-12 17:31:26'),
('43bc1797-375b-4f75-8d9d-19d7feb0307f', 'bedca568-4025-4fc0-83d8-322aed37de3f', NULL, 'PENDING', '8a4046ab-7312-4925-adbc-aa39f223ba72', '2026-04-05 17:31:26'),
('46d0dd47-21fa-412c-999c-8fe75e6dcadc', 'd193cdba-7c8b-4ddb-ac38-e8d375d7ae35', 'PENDING', 'IN_PROGRESS', '909c7e71-9ed7-4129-b13a-63ecfeb92bea', '2026-05-15 17:31:26'),
('46d8dcd9-4f9e-4a7b-b7f7-d3ecc2d6d7a9', '83873fca-e77a-48bb-9970-a11122b7526b', 'PENDING', 'CANCELLED', '909c7e71-9ed7-4129-b13a-63ecfeb92bea', '2026-05-10 17:31:26'),
('4d42b684-7b05-4665-b401-babbdd267382', '4553077b-7ea0-474e-9c65-7c2e05dc8859', 'PENDING', 'IN_PROGRESS', '8a4046ab-7312-4925-adbc-aa39f223ba72', '2026-05-15 17:38:18'),
('50abf784-ce82-4a46-88f7-403043eec613', 'b627ce47-8147-40c5-bf9d-133094da4b4c', 'PENDING', 'IN_PROGRESS', 'dbc15515-5b8c-4a2a-812f-a7eb747ee136', '2026-05-04 17:31:26'),
('64a84079-5b98-4c3f-837d-531490a0e4ca', 'bedca568-4025-4fc0-83d8-322aed37de3f', 'IN_PROGRESS', 'DELIVERED', 'cd61642a-2e07-4b55-816f-682746c72c58', '2026-04-07 17:31:26'),
('6eca6bc0-59e9-4fd7-8853-00c13fb1e25b', '6df3aa42-c512-4e45-ad3b-cf7c5c013a8b', NULL, 'PENDING', 'dbc15515-5b8c-4a2a-812f-a7eb747ee136', '2026-04-30 17:31:26'),
('750ec7ec-7cd9-41b5-a48d-14c2b37b1f40', 'bedca568-4025-4fc0-83d8-322aed37de3f', 'PENDING', 'IN_PROGRESS', '909c7e71-9ed7-4129-b13a-63ecfeb92bea', '2026-04-06 17:31:26'),
('80a99f7a-b16e-48e8-96b8-8860bec5ee00', 'd64abc3c-59e3-44cf-8cee-d773b08fa5de', NULL, 'PENDING', 'dbc15515-5b8c-4a2a-812f-a7eb747ee136', '2026-04-10 17:31:26'),
('974da766-17d5-4f3c-883d-d0419094b70d', '9140a3b1-dc9e-42ec-9e21-f19b6f39e854', NULL, 'PENDING', 'cd61642a-2e07-4b55-816f-682746c72c58', '2026-04-20 17:31:26'),
('9b588ec1-da3d-4d6b-942a-9b583dc37203', '056889ac-532f-4655-864f-c1c66f764503', NULL, 'PENDING', '909c7e71-9ed7-4129-b13a-63ecfeb92bea', '2026-05-13 17:31:26'),
('b6cb6851-6ccc-48b5-9ac8-1dfdf15ef2ec', '020d12f5-021c-42a5-8e2f-fff87fd61473', NULL, 'PENDING', '909c7e71-9ed7-4129-b13a-63ecfeb92bea', '2026-05-10 17:31:26'),
('c3a37a4c-e90e-45be-8ce6-ca903494a5a2', 'f9ab5ae0-de1f-492a-8786-0338b3f054f3', 'PENDING', 'IN_PROGRESS', '8a4046ab-7312-4925-adbc-aa39f223ba72', '2026-05-15 19:06:00'),
('c6d254ba-b9d8-402d-9a58-275861c4f0d8', '4553077b-7ea0-474e-9c65-7c2e05dc8859', NULL, 'PENDING', NULL, '2026-05-15 17:37:42'),
('d69995e0-0d4d-4720-9e8a-87b4ba68a1d1', 'b750e3eb-df28-4661-87e0-f5cdd5388620', 'PENDING', 'IN_PROGRESS', '8a4046ab-7312-4925-adbc-aa39f223ba72', '2026-04-01 17:31:26'),
('daaf8d72-5d15-4e6a-b25d-528751703289', 'f9ab5ae0-de1f-492a-8786-0338b3f054f3', NULL, 'PENDING', NULL, '2026-05-15 18:35:26'),
('dcd4d1ef-5108-4e26-a5f3-8a367efea425', 'b627ce47-8147-40c5-bf9d-133094da4b4c', NULL, 'PENDING', '909c7e71-9ed7-4129-b13a-63ecfeb92bea', '2026-05-03 17:31:26'),
('dd70b743-d02b-4b7c-b910-42ac4361ad65', '7df63fed-7631-417b-a48a-f74ab6eed6d4', 'IN_PROGRESS', 'DELIVERED', 'cd61642a-2e07-4b55-816f-682746c72c58', '2026-05-14 17:31:26'),
('de9ec550-e04c-4c04-af70-2eff2a16fcb7', '83873fca-e77a-48bb-9970-a11122b7526b', NULL, 'PENDING', 'dbc15515-5b8c-4a2a-812f-a7eb747ee136', '2026-05-09 17:31:26'),
('e2cd2b4d-bc77-4f78-9313-b3c4d37931c2', '6df3aa42-c512-4e45-ad3b-cf7c5c013a8b', 'PENDING', 'IN_PROGRESS', '909c7e71-9ed7-4129-b13a-63ecfeb92bea', '2026-05-01 17:31:26'),
('e7f956d3-b2d9-454b-a789-aa014bade98a', '7df63fed-7631-417b-a48a-f74ab6eed6d4', 'PENDING', 'IN_PROGRESS', '909c7e71-9ed7-4129-b13a-63ecfeb92bea', '2026-05-13 17:31:26'),
('f04ccb6a-6c38-4ae8-827d-01df4af64cd7', 'b750e3eb-df28-4661-87e0-f5cdd5388620', NULL, 'PENDING', 'dbc15515-5b8c-4a2a-812f-a7eb747ee136', '2026-03-31 17:31:26'),
('fcdd4da3-61ff-4d12-9de3-5b79c33cd5db', 'b750e3eb-df28-4661-87e0-f5cdd5388620', 'IN_PROGRESS', 'DELIVERED', '909c7e71-9ed7-4129-b13a-63ecfeb92bea', '2026-04-02 17:31:26');

