-- Host: db-master-9.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=34792;

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$kEEKtQD4wosoD4hDNUaK2bOIfTsUgYN6GojkKLb91QHf3QfGEiVxT','user','ak_97d91ce5d2764ea6','2023-09-06 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$UP3tNO.8DRj3y7cBsFv3hJOXPeGYtCZWmvs0V1OEPZqjQcOTU7G4K','user','ak_474dfe676535561d','2023-10-18 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$VDYBcUrtZyR30WEA14s02ktf00HQRXLCsXeFdUA4v4Aq1vU.RlII.','admin','ak_340dd9807bf8f75e','2023-05-21 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$DFdNcpKXGSzdjSK6fBwVkUvTcyo9o.T0w7VWoPEGoxP50USj8bAsa','admin','ak_f180cc0857274608','2023-10-22 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$5qUcoYDStdU4Y70CFcYrDUcpkXrgfAKnseSCVR5o6FWJiqpHcSURZ','user','ak_873d577c489a6c58','2023-09-25 10:07: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=49530;

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

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


