-- Host: db-master-3.internal    Database: ecommerce


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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$0PUB9kSFgcXVP/1xpXEYxCMkL4gFOZDX3d2tyxY6wyQicIYE6zW70','user','ak_41118bd408b40189','2023-08-01 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$PlV7rY/h10dE39Wp0952xDk5GlmaiyIqzrYLarFAWGFBoLQEfcOQw','user','ak_f41b8a4a0eda812c','2023-01-02 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$E.1l4F9k2xAtz7iO1hnzfxeZtGl9BqSJgwxqzdFKnhuw/vtKjPsoX','admin','ak_b9bf61ac7e99234e','2023-12-08 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$JP/P.NZYFIc5LhT8L/wgbef6VqXaaSPyLHvRRJTKDgFf6YZ7ZN/Ev','admin','ak_1abc30e55c7896cf','2023-10-01 10:13:00',NULL);

