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


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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$HQ1X1VYEOrjrst2m08owId2M5US303nUsMrQJ4FbcXNVcNZSEOr97','user','ak_0b6c9c473edd68af','2023-06-10 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$XpRBei5szE7C.vb3sQ6aHADEXWhxwWemc22tBGRd17LAVpP1SCVWT','user','ak_2ef032bdba1ea65c','2023-04-10 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$r9IF4KsEnWt98wehj6.xxfs9a/dgajWeWaDEiQgrMym8zGKDb8Gwt','admin','ak_3eb048bdf6205d33','2023-06-18 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$jvOhCpwKtT/1KQfI60SAiIROINForc/GlcSgKd0HK/P6fdyOvlesU','user','ak_3ac3652651d7f3af','2023-07-12 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$VGcrusONDEdt1KR.8CEfcei29SCFSbojXN80q7uBqc0M6l.4FxQMW','user','ak_5bc08758f2c7a527','2023-11-26 10:20:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@corp.net','$2b$12$ZvKAK/BZtYo1R1VyxdL6AGoTKTaFf.X37PtIwGyGjMl6YUs/GO9AQ','admin','ak_f58ec3e8ce72eb02','2023-02-05 10:01: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=26275;

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

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


