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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$vawfB0oIkFDHl1zxej4hyov6KxaeBqez6E7TgEtqF.9SbiBiSwlGf','user','ak_7e553006e3887d44','2023-05-08 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$85BQ48/KLhsQX1QyY.yp5Ui3/khUZx0tXCTKCjIW8JPTirlWwqcgb','user','ak_f13a7647fca9ede3','2023-06-20 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$zLx22.e99ipHcDfp6YfwtA6H/xdO.qy21FT8rIj/e5UfbucEqwYqP','user','ak_f8424f3154ad86e1','2023-02-04 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$f2XMDb9rYohayF0BAjnMJe1fg9Qav/w2mXzzQMgtf8UP/YleIkTS5','user','ak_3b6e2ff4d463c348','2023-11-02 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$xSeWPh5NQRgiWedvYy3xs9M5Lo5H/P8O/WFokhDcMQLvnx3jm2mYW','user','ak_f1643f4ba95f894e','2023-03-05 10:13: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=26696;

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

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


