-- Host: db-master-8.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=4797;

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$3gdMXAjPkd0Vifcv.3/RnFjWjYOQ0bsZONXmnWXrRUAzs9raFoDMV','user','ak_992bbe2c8e447930','2023-12-26 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$m1YxmZQZNHzVrfYcd2gmOZV0/x84idvSqQEdBPvs3ZQrxFtDaF0g5','admin','ak_5764a81387f58ebe','2023-09-16 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$0StaHJU5jqNcRA3nuVKF0M4.Vj4tXq5uUcBuRj9m1s.UhrBU38ANB','admin','ak_c695576a44ed7462','2023-11-06 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$83ASLqqSKof7Y8f4wAuujLxsQnPM8BqX8clG8CuYZOA594FSCRavg','user','ak_7f5b68ade2f677d7','2023-07-26 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$9aChkpwU4CmfmaPfV/OtUG1kLWwGvs9T8IrEfBt6qVTlDvw1rm4b3','user','ak_ca0c0305c7fb0bec','2023-06-17 10:13:00',NULL);

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

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


