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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$kLi7q/NzrwgAuPRy69HMrOIx3G5VgswXxxmJlpM6jYjMAkw7rwzTq','admin','ak_79872424ea3e9333','2023-10-27 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$b3dCQQ1t.aJRYqtcxTn88Ugdz1yKWDf3yWzJDWOnUds0adszPuxi/','admin','ak_39561cc0b47c08a7','2023-05-10 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$n.OxACZJZGBagppPMwBN7z/r9PX2F44hAv7Tw3BiYQ9JRbcJY.RG.','user','ak_c59c94721972e154','2023-11-03 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$.jarhff6sq8A.J4dWXSUqqxw2VEYLui8dlitRIMnJGUu0Y2TSYrTd','user','ak_050dd27a1c420f59','2023-10-18 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$SvoBUZsGxy3pqhmQx9AyOmluEtxoZYIsVb69cjYqibLacC4vyKnHi','admin','ak_cc3500651ea868e4','2023-05-25 10:11:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=17566;

--
-- Dumping data for table `products`
--


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

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


