-- Host: db-master-1.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=19619;

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$gbbrCMrVx72vNoFSWV/HzQ07LHpU/540mdqpUehlimxj/hNRfQ3Pv','admin','ak_e72fc838a89c8515','2023-12-26 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$.5WzQATtGn4XjcbqdjLpR9xrr7Qm.rRlu/k9eDegOTRkDB002A882','admin','ak_6ae5562482447c2c','2023-03-27 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$RKNwP771MCxh4iH158Rm77X9hyN77uLIhyqyzLGG/9aQ6m/lg5Dwj','user','ak_06e043850e3545bd','2023-02-12 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$Tz0BlIUV8KUoNQqLrMPUE5FmU0LoTzw0twI9wCZj6z.kAU4wbkQF3','user','ak_c153820f292dd5f2','2023-10-12 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$MmRKhVRU0bSca45GGUOhD9uRXeiuS2Ba6RzKRfI0DOuVK8Bny3XZk','user','ak_2040d96aa7acfd47','2023-01-03 10:06:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@internal.io','$2b$12$2el.ohpHor0EBdoawjvH0OGsLp9eUubktGHOGQ/aco7s8mI6DONCw','admin','ak_7a92b85f70560c97','2023-05-23 10:12:00',NULL);

