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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$ZZqkhAjvwyon7Lcm03CQ/HFA4dgCtVL8FvSELlfu2mnri1esNPikn','admin','ak_5f8a056ad31a3626','2023-09-12 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$QtS50ZmB7XhpGORuEn/CGOlDeQh1JrRS4ah79GCwrtNpxvy30uCoh','admin','ak_93cce500b3ce6ccc','2023-06-24 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$yIQqlLfwGudfmk2V6a3iiK/0zf1r7hzSseUVZXVGCHM21S4Z55vFn','user','ak_50c35a19c5303026','2023-04-09 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$WkseBbCX.0lQRP1CxGPG2a2zGteZ5HFKiiIjpd8SNgE9XfKTE2IVC','user','ak_390e63b5861c6f96','2023-10-12 10:06: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=10142;

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


