-- Host: db-master-6.internal    Database: customers


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=22276;

--
-- Dumping data for table `orders`
--


--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=29865;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$1C7DDotedMIaDG2AlqKyalDAYt4xIOI.ggptndf7xdilYQsPO1rlq','admin','ak_eca8bbeb27b3b6fd','2023-01-06 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$PsQaz5k/NSdtsXrIsNpoSuKzbYIp9xRSG7mFMGsGUhCnpQ8R3yeTT','admin','ak_98d97c53ffde0f28','2023-02-23 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$Vl/0QHNoUGc0kylUczZvgLcP8uFQqbin5WFN6Pbddta0S1dGHNgLZ','user','ak_0da365a2cb5295a4','2023-06-05 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$fp7DdLu.fLF21OYcdG7vNrOmjgvZx63NBhtDTLttMQdjgc.QN4dEB','admin','ak_d54a34a77f59660c','2023-03-01 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$DX7WYNSwdCOWuh6rN5bDnlDD7jqwA0eGt8azhEoc/F/cWf697pvyP','user','ak_59c1636beca6b332','2023-02-18 10:00:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@internal.io','$2b$12$/Ev16WOcmZ6kPHeFUqaEOl0iBNpulzxCm8My9BxOlrisZ1EsY75q7','user','ak_8adc839373bacde9','2023-10-16 10:12:00',NULL);
INSERT INTO `users` VALUES (7,'john.doe@example.org','$2b$12$iN6RV3ORlZAZzWY1ktbufvo2lOMivkDt.pMqMWX5PeQM4toea5QB/','user','ak_6d4775a70b2d952e','2023-02-05 10:23:00',NULL);

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=33774;

--
-- Dumping data for table `audit_log`
--


