-- Host: db-master-9.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=18473;

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

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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$buVh7ZOnIpyYpcmgBegEJEYi.XVgE0vMODAYYrkGAkGALD.DdS73u','user','ak_705f5a98abda2a82','2023-01-08 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$pLecuS0LgbZkNUYmsDgrUYxKoS0H8gyJ/VzktbX5xXI7dMiiqFypi','user','ak_5736552ecbdc4838','2023-08-20 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$N3f9rDHo1huxS7kQYzI.ZaTercVKdY4qJOaFy5ty6F5Og.KjvJRC0','admin','ak_3fc58e65d5250e16','2023-08-08 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$tDAisqTL8KKGU0MtHEuV8lEblYG2bMCGGVIBbgMP8pXdj95I6FcGr','user','ak_01f30dd4544bce96','2023-03-28 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$aRX7wNkm/obREIVjIzAuyoP2SVeag29KjTS1CDDH2/8K3rouxhDhL','user','ak_c1a97cc44a56d41c','2023-06-01 10:02:00',NULL);

