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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$asAGagrTwhZ/33qFTToudWGuovFy9juwrDTK91io2iz64uB3DCwQO','admin','ak_2d246c6188f8fe2e','2023-03-07 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$ccyNrUqXUHesZYoI6fNI0oQ.l21RwyYeRFKPVQpAAR1hwQ9rnB593','admin','ak_ef395a1ae40884cc','2023-06-05 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$EV1rMVCOLqrqrwYGou16wM6s.oy30GMf73rZ.GoY1f67QEaXERPW.','user','ak_025889dc9b326f9e','2023-11-10 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$ag1PrUsTb03ML6XftVk7MbUbRXrXWXYPyhxbiKBEfc/x.vC4WDq0U','user','ak_03d712c55c4ac153','2023-09-14 10:08: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=30108;

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


