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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$9TSwCR/XeBrk9mbC1/SxR6mk88l1Z8HWfdyrfkBfLRirDKcrpva0Q','user','ak_cd29dd8a67ce13d0','2023-12-23 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$jmL/jEk428PsYjeJ/rcx2WRKQ6V053zPTwEoLhR9HAVHkoIi1./.f','user','ak_94840ca5af474901','2023-05-03 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$C2uFK6s1tzEJl2XuOTO.aXYuEiWWNryZliPhF7RtXTmLOHzd3ATDr','admin','ak_cca24af2c637340b','2023-08-01 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$r7ASmwczc7CUdVjhgjHSqgxMmyFvTDkdkpMVHgXCoXCBzQTfCNmXa','admin','ak_b1ea7db1ed601ff3','2023-02-24 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$St8sJ6hWDmc/Sp35mTQu.pyG7bzvcyxg4hZ.ta9wArAkuIuDedODn','admin','ak_419d3ac3d8da5970','2023-04-19 10:12:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@company.com','$2b$12$ctLeIdhydHaVohye1AtC1Saq30CHmq2eFE5OBx24Nf4t0U6ILWsdO','admin','ak_ab3d5bc53a2301cd','2023-03-22 10:18:00',NULL);

