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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$3AagO5CwZNZfCkbTWdOTgjHeKQytYccy8HXhPpg7xa0MegpK5r10e','admin','ak_744e555832f93c28','2023-04-13 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$tYqs5ugRxV6tIkouJCOyEyGfbwfO0hLwu1JthLARlcb/.MrJtXLuc','user','ak_67f75f46d0e3f5e6','2023-09-22 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$J4R8XP2SmVneC2p7NPtin.sf7fHy8.aff5n/7F21aX3faZRCfSUE.','user','ak_17f6c62233c0d0f4','2023-01-25 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$3c/Oqb50FgR/4hMO7nLIN1P1KIYqjt8CIMl2nOwKO3YOglnRId0rt','user','ak_d8f1639f77d50e91','2023-04-11 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$cnGTL40VwxFY1owIGqz0SrI2tIEoHrlPrQ7Vxjx5uEr5KZ5KT23xi','user','ak_64f8f3bbe3fe986b','2023-04-20 10:13:00',NULL);

