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


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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$l5mzAw2rqwtQTpcY1P4L6CAVxm6SQprWym/JRlrONyxva7e/.XyHR','user','ak_2e07c6031bf30894','2023-06-13 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$ddy1C7L.UATHW0mn0Wr0qfHy0uKVTlFqumr2He3rh4eubPZHX1Rfu','admin','ak_0f8ee78b093f0fe1','2023-06-09 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$jIi31nANFCOogBAUPbnpzfebSP0E3TCUHQkDRAGkpgSwd70fqOQaL','user','ak_9b892dad2c9db226','2023-06-13 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$L7e5jXf8Opbj871TBOgFyo6hd0uUYI5vwaWizU505JPfBeYvrg4Vk','admin','ak_5f71d05e8b8f2774','2023-01-09 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$ICRWnFeiq2WxHUnUwMQK/nOk858m/.4HzvsQRQdwF11dpg9lEqB1Q','user','ak_480ed17f8bde6743','2023-11-14 10:18:00',NULL);
INSERT INTO `users` VALUES (6,'admin@company.com','$2b$12$xjhHVrANPueQJ5VUIPyuNCXKkI7XdHQ3OC9/jib35hb4Mj4InhXPl','user','ak_a565d01122ae664e','2023-08-08 10:03:00',NULL);

