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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$SSfMEhwrXwgpOUkOSFM17LhRT745NqCW5KmnJrsTxxuvBKa2byR6h','admin','ak_eff5509068a711df','2023-12-22 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$j//xu5RBVM/i2/kgB2NNpKXnSmTY1V7gLQqg30DFefIwYvqeZDxmT','admin','ak_e38d0c33d5c5f2c9','2023-08-03 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$51xJdswRgdomSCR0JjBFdZRdLpuFY.aehuIJtdSBwPlDD0zbe8J.Z','user','ak_4e3f2cdedea7236a','2023-09-22 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$23T4/b4/ihqMMkB8pUbXE/mYgD3Tu5VjLm9nnOaMm0PsRVg2hqaGw','admin','ak_fd2a8df85314ed0b','2023-02-08 10:23: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=21619;

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


