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

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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$oKfvtZAIYuE7GXyN3NsDaZZr3pC4tSMwdct1DJHHcPNBk/vbI4.id','user','ak_75abcc399b60c712','2023-02-27 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$AAh6MQD7e.XZ5cPIpVnFE9TJUqDNcgrcPdOE1wMcu37xt89c.w2RK','user','ak_17b842c618a35c44','2023-07-12 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$ju82/DrKJCgBAfMJGC.TpA/BAxRUAEbAqJCE5cptTKeYg.qjw5bNg','admin','ak_ccf8d69b580ada57','2023-03-13 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$N7t/IzEZJiMvb6YpvC9mRQi78zC8mD7BwsURM3eSgLkDAF/0DfBkA','user','ak_aed2cb502717a185','2023-02-14 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$fEVzeZj2c8IrF9sxUNn0WEEBZUnE4gb./SACvGyitPw14eyZ6ImgG','admin','ak_063122d94ce7eb28','2023-02-16 10:10:00',NULL);

