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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$KGSXBoDHKPhee/phpCADscpaY6iGdgpdPpWaZxRoPKvKzAjxhVmlR','user','ak_a848cb82f68cd02b','2023-11-10 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$WZDRlWTtNw5QIhpkoYCLFM6ckdXiQF8.y4FFMW./dGRliIb93QcHN','user','ak_87ed6be9c4b9ae2b','2023-10-24 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$eNN2fcUsi8LBheX9XJ1EVm0WAMmyxIYFmFpbvJ0nsvngUgNLYxNAj','user','ak_c2ceaac5e154dd9e','2023-09-14 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$uQWCnY2SdsTO3qn4MUUtvcr9BeRh7DpsFSBYh5R.55olXJv5D/zgt','admin','ak_ba90b88f08353f0f','2023-12-13 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$0e7PjUljku2b1YIS98m5P8qwfCkDIHjlnFbNGR1UcyRS7ImzGQhdV','user','ak_27c63136efd9a570','2023-12-11 10:02: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=40129;

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


