-- Host: db-master-1.internal    Database: analytics


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

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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$1B1QN6.4otKYNbsaiaM3D06I55P44jDGKnjUn6xaH5qs5O8unG0zh','user','ak_ce94128aa4cde3ad','2023-03-17 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$ikYs8Gay7LQz3GrOX7u8furYyOeGpyFQWhawQkJBwVODWw9TH0qiz','user','ak_0680f0d9df759d98','2023-12-17 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$RWlQkFKvjV8uG7zeuynWnXaUkZauO9g9BXfBDsBpG4FIgxpNkESt2','user','ak_371e89741cdb3f84','2023-07-03 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$hSrquclAmKE/Kdlj2kDdnZkHsHRpXugfMptW.J2.8NIrVzEiG.72B','user','ak_9155da9a48b76eae','2023-10-02 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$RuUHCmEHh.n.hgZD5xQrpTCo.JuQ24MGgexbH7U0DAWZbL0Nb1c3D','admin','ak_dec75f272ddd3cff','2023-02-19 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=13520;

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


