-- Host: db-master-9.internal    Database: ecommerce


--
-- 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=50271;

--
-- 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=6188;

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$jIQGsUb0eHNRqCFQ/0FnCOKWmuf8oUkTmKqnMDcU44Iym3LjlfRIW','admin','ak_6382686dca2fb97b','2023-07-06 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$ri3S9yGSm6IFZ0n54iIB1c15SD9vB9TBWxuQmFioafeaFvXB6CPrW','user','ak_015b5b0677d76c8d','2023-05-16 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$Ttvo7Hl7wT0uAkajAmZyMWLkLIBA7AtFtrUjEhV3nbfuO.rdbhGnd','user','ak_f9c57819be0d55a1','2023-12-23 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$6TgeWxtkpQDXqGZawbFkr.qZGO9otGiPZLOc3aK1jXElVzpaVGqKd','user','ak_9794d9a5313ccdea','2023-04-22 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$QoZbqVSWUlJqQoLa6S6nU93rSBOcTKGqoHDVzQyvbGRk88qUziibP','admin','ak_aaded40506d9d505','2023-10-05 10:21:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@company.com','$2b$12$ydOT23QXz96DNW6r0PHDthsw92oLVQDNNP1.Xi2O21dQrkQhwtb0v','user','ak_cce1bf76aa29f665','2023-04-27 10:06: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=40832;

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


