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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$ICVrYdYfuyDyomJmEtDHQmZoTwfvDOUtRcjgoNmhFLxtnESBM8QOI','user','ak_0c124e17e812c9ed','2023-04-13 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$x5Txz9Byoc/gVSwNR.k/sImWSimrfVeBlXP2tUbic7hKRIthUxs11','admin','ak_581981ffdaef0ae6','2023-08-21 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$upHgPZqu.PrOTsec/dB2T5rQAYyAzrlBHZ/WKMxT1DUQbAr4vHvd8','user','ak_aa31aaf36ffed1db','2023-11-28 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$Vi.yHY4qDDevjDKctsyER/kdG61YkFQPOQDkhDxhLOEMl.C.54sw4','user','ak_42c3403dc440f47c','2023-05-11 10:21: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=5047;

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


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

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


